public LockComponent build() {
    LockLevel level = LockLevel.DB;
    if (tableNameSet) level = LockLevel.TABLE;
    if (partNameSet) level = LockLevel.PARTITION;
    component.setLevel(level);
    return component;
  }
Get the constructed lock component.
@return lock component.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java