/**
* Get the constructed lock component.
* @return lock component.
*/
public LockComponent build() {
LockLevel level = LockLevel.DB;
if (tableNameSet) level = LockLevel.TABLE;
if (partNameSet) level = LockLevel.PARTITION;
component.setLevel(level);
return component;
}