public class DatabaseSchema
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<SchemaAttr,java.lang.String> |
attrs |
Constructor and Description |
---|
DatabaseSchema()
Creates a new empty schema
|
DatabaseSchema(DatabaseSchema other)
Returns a copy of the given schema.
|
Modifier and Type | Method and Description |
---|---|
DatabaseSchema |
addAttr(SchemaAttr attr,
java.lang.String value)
Used for attributes that apply to the database as a whole
|
DatabaseSchema |
addRelationalSchema(RelationalSchema schema)
adds a schema to Schemas
|
java.lang.String |
getAttr(SchemaAttr attr)
Returns the attribute
|
java.util.Map<SchemaAttr,java.lang.String> |
getAttributes()
Returns the attributes as an unmodifiable map
|
RelationalSchema |
getRelationalSchema(java.lang.String name) |
java.util.Set<RelationalSchema> |
getRelationalSchemas() |
boolean |
hasRelationalSchema(java.lang.String name)
Returns whether or not this has a schema with the given name
|
boolean |
isLimitUsingFetchRows()
Returns whether or not this schema should use FETCH FIRST x ROWS for limit results
|
boolean |
isLimitUsingLimit()
Returns whether or not this schema should use LIMIT for limiting results
|
boolean |
isLimitUsingTop()
Returns whether or not this schema should use TOP for limiting results
|
@NotNull protected final java.util.Map<SchemaAttr,java.lang.String> attrs
public DatabaseSchema()
public DatabaseSchema(@NotNull DatabaseSchema other)
other
- The schema to copy@NotNull public DatabaseSchema addAttr(SchemaAttr attr, java.lang.String value)
attr
- The attribute to addvalue
- The value for the attributepublic java.lang.String getAttr(SchemaAttr attr)
attr
- The attribute to get@NotNull public java.util.Map<SchemaAttr,java.lang.String> getAttributes()
public boolean isLimitUsingTop()
public boolean isLimitUsingLimit()
public boolean isLimitUsingFetchRows()
@NotNull public final DatabaseSchema addRelationalSchema(RelationalSchema schema)
schema
- The schema to add@NotNull public RelationalSchema getRelationalSchema(@Nullable java.lang.String name)
name
- The name of the schema to retrievepublic boolean hasRelationalSchema(@Nullable java.lang.String name)
name
- The name of the schema to look for@NotNull public java.util.Set<RelationalSchema> getRelationalSchemas()