com.im.commons.db 5.9.2

com.im.commons.db.util
Class SchemaQualifiedName

java.lang.Object
  extended by com.im.commons.db.util.SchemaQualifiedName
All Implemented Interfaces:
Serializable, Comparable<SchemaQualifiedName>

public class SchemaQualifiedName
extends Object
implements Comparable<SchemaQualifiedName>, Serializable

Schema qualified table name representation.

See Also:
Serialized Form

Constructor Summary
SchemaQualifiedName(DBTableInfo table)
           
SchemaQualifiedName(String schema, String table)
           
 
Method Summary
static String addSchemaToTableIfMissing(String schema, String name)
           
 int compareTo(SchemaQualifiedName o)
           
 boolean equals(Object obj)
           
 boolean equals(String fkSchemaName, String fkTableName)
           
 String getSchema()
           
 String getTable()
           
 int hashCode()
           
static String schemaPlusTable(String schema, String table)
           
static String[] splitSchemaFromTable(String schemaPlusTable)
          Splits the schema name from the table name.
 String toString()
           
static SchemaQualifiedName valueOf(String schemaQualifiedName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaQualifiedName

public SchemaQualifiedName(String schema,
                           String table)

SchemaQualifiedName

public SchemaQualifiedName(DBTableInfo table)
Method Detail

getSchema

public String getSchema()

getTable

public String getTable()

valueOf

public static SchemaQualifiedName valueOf(String schemaQualifiedName)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(String fkSchemaName,
                      String fkTableName)

compareTo

public int compareTo(SchemaQualifiedName o)
Specified by:
compareTo in interface Comparable<SchemaQualifiedName>

addSchemaToTableIfMissing

public static String addSchemaToTableIfMissing(String schema,
                                               String name)

splitSchemaFromTable

public static String[] splitSchemaFromTable(String schemaPlusTable)
Splits the schema name from the table name. For a schema qualified table ("FOO.BAR") retuns FOO as first element and BAR as second. For a name without a schema prefix ("BAR") returns null as the first element and BAR as second.

Parameters:
schemaPlusTable -
Returns:
First element is schema, second is table

schemaPlusTable

public static String schemaPlusTable(String schema,
                                     String table)

com.im.commons.db 5.9.2