Package io.ebean.config
Class TableName
- java.lang.Object
-
- io.ebean.config.TableName
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCatalog()Gets the catalog.StringgetName()Gets the name.StringgetQualifiedName()Returns the qualified name in the form catalog.schema.name.StringgetSchema()Gets the schema.booleanisValid()Checks if is table name is valid i.e.static Stringparse(String qualifiedTableName)Parse a qualifiedTableName that might include a catalog and schema and just return the table name.StringtoString()StringwithCatalogAndSchema(String name)Append a catalog and schema prefix if they exist to the string builder.
-
-
-
Constructor Detail
-
TableName
public TableName(String catalog, String schema, String name)
Construct with the given catalog schema and table name.Note the catalog and schema can be null.
-
TableName
public TableName(String qualifiedTableName)
Construct splitting the qualifiedTableName potentially into catalog, schema and name.The qualifiedTableName can take the form of catalog.schema.tableName and is split on the '.' period character. The catalog and schema are optional.
- Parameters:
qualifiedTableName- the fully qualified table name using '.' between schema and table name etc (with catalog and schema optional).
-
-
Method Detail
-
parse
public static String parse(String qualifiedTableName)
Parse a qualifiedTableName that might include a catalog and schema and just return the table name.
-
getCatalog
public String getCatalog()
Gets the catalog.- Returns:
- the catalog
-
getQualifiedName
public String getQualifiedName()
Returns the qualified name in the form catalog.schema.name.Catalog and schema are optional.
- Returns:
- the qualified name
-
withCatalogAndSchema
public String withCatalogAndSchema(String name)
Append a catalog and schema prefix if they exist to the string builder.
-
isValid
public boolean isValid()
Checks if is table name is valid i.e. it has at least a name.
-
-