Package org.pgcodekeeper.core.schema
Class AbstractColumn
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractColumn
- All Implemented Interfaces:
IHashable,ISearchPath,IStatement
Abstract base class for database column definitions.
Provides common functionality for columns across different database types.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Method Summary
Modifier and TypeMethodDescriptionbooleancompare(PgStatement obj) This method does not account for nested child PgStatements.voidcomputeHash(Hasher hasher) Computes the hash of the implementing object using the provided hasher.Gets the schema that contains this object.abstract StringReturns the complete column definition including type, constraints, and other attributes.Gets the location information for this statement.booleanGets the type of this database object.getType()booleanChecks if this statement is a sub-element of another statement.voidsetCollation(String collation) voidsetDefaultValue(String defaultValue) voidsetNullValue(boolean nullValue) voidCopies all object properties into a new object and leaves all its children empty.Methods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendAlterSQL, appendComments, appendOwnerSQL, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, compareChildren, deepCopy, equals, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDbType, getDeps, getDescendants, getDropSQL, getDropSQL, getLibName, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.ISearchPath
getDatabase, getSchemaNameMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getName, getParent, getQualifiedName
-
Method Details
-
getStatementType
Description copied from interface:IStatementGets the type of this database object.- Specified by:
getStatementTypein interfaceIStatement- Returns:
- the database object type
-
setDefaultValue
-
getDefaultValue
-
getFullDefinition
Returns the complete column definition including type, constraints, and other attributes.- Returns:
- the full column definition as SQL string
-
setNullValue
public void setNullValue(boolean nullValue) -
getNullValue
public boolean getNullValue() -
setType
-
getType
-
setCollation
-
getCollation
-
getLocation
Description copied from class:PgStatementGets the location information for this statement.- Overrides:
getLocationin classPgStatement- Returns:
- the location where this statement is defined
-
compare
Description copied from class:PgStatementThis method does not account for nested child PgStatements. Shallow version ofPgStatement.equals(Object)- Overrides:
comparein classPgStatement
-
computeHash
Description copied from interface:IHashableComputes the hash of the implementing object using the provided hasher. The implementation should call appropriateputmethods on the hasher for all fields that should contribute to the hash value.- Specified by:
computeHashin interfaceIHashable- Parameters:
hasher- the hasher instance to use for hash computation
-
shallowCopy
Description copied from class:PgStatementCopies all object properties into a new object and leaves all its children empty.- Specified by:
shallowCopyin classPgStatement- Returns:
- shallow copy of a DB object.
-
getContainingSchema
Description copied from interface:ISearchPathGets the schema that contains this object.- Specified by:
getContainingSchemain interfaceISearchPath- Returns:
- the containing schema
-
isSubElement
public boolean isSubElement()Description copied from class:PgStatementChecks if this statement is a sub-element of another statement.- Overrides:
isSubElementin classPgStatement- Returns:
- true if this is a sub-element
-