Package tilda.parsing.parts
Class Object
- java.lang.Object
-
- tilda.parsing.parts.Base
-
- tilda.parsing.parts.Object
-
public class Object extends Base
-
-
Field Summary
Fields Modifier and Type Field Description Cloner[]
_CloneAs
ClonerFrom
_CloneFrom
java.util.List<Object>
_Clones
java.util.List<Column>
_Columns
boolean
_ETL
java.util.List<ForeignKey>
_ForeignKeys
FrameworkSourcedType
_FST
boolean
_HasNaturalIdentity
boolean
_HasNonUniqueIndex
boolean
_HasUniqueIndex
History
_History
Object
_HistoryObj
HttpMapping[]
_Http
java.util.List<Index>
_Indices
ObjectLifecycle
_LC
java.lang.String
_LCStr
boolean
_OCC
PrimaryKey
_PrimaryKey
Object
_SourceObject
View
_SourceView
java.lang.Boolean
_TZFK
TZMode
_TzMode
java.lang.String
_TzModeStr
-
Fields inherited from class tilda.parsing.parts.Base
_AppDataClassName, _AppFactoryClassName, _BaseClassName, _Description, _DescriptionX, _EntityClass, _HasUniqueQuery, _JsonDEPRECATED, _Masks, _Mode, _ModeStr, _Name, _OriginalDescription, _OriginalName, _OutputMaps, _PadderColumnNames, _ParentSchema, _Prefix, _Queries, _RealizedObj, _RealizedView, _ReferenceTag, _ReferenceUrl, _ShortAlias_DEPRECATED, _TenantInit, _TildaType, _Validated
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AddColumnAfter(Column SiblingCol, Column NewCol)
protected void
addForeignKey(java.lang.String Name, java.lang.String[] ColumnNames, java.lang.String DestinationObject)
void
addQueries(java.util.List<SubWhereClause> Queries)
void
addQuery(SubWhereClause SWC)
Column
getColumn(java.lang.String name)
java.lang.String[]
getColumnNames()
java.util.List<Column>
getCopyToColumns()
java.util.List<Column>
getCreateColumns()
java.util.List<Column>
getDefaultCreateColumns()
java.util.List<Column>
getDefaultUpdateColumns()
java.lang.String[]
getFirstIdentityColumnNames(boolean naturalIdentitiesFirst)
Returns the list of columns that represent the first identity of the object.java.util.List<Column>
getFirstIdentityColumns(boolean naturalIdentitiesFirst)
Returns the list of columns that represent the first identity of the object.java.util.List<ForeignKey>
getForeignKeys(java.lang.String targetSchema, java.lang.String TargetObject)
java.util.List<ForeignKey>
getForeignKeys(Column Col)
Object
getHistoryObject()
Index
getIndex(java.lang.String name)
java.util.List<Column>
getJsonColumns()
ObjectLifecycle
getLifecycle()
boolean
hasAutos()
boolean
hasCollectionColumn()
boolean
hasCollectionQuery()
boolean
isAutoGenForeignKey(java.lang.String Name)
boolean
isAutoGenPrimaryKey(Column C)
A Column is an autogen PK if and only if it is the one column defined by the PK.boolean
isCSVable()
Checks if there any CSV output mapsboolean
isJsonable()
Checks if there any JSON output mapsboolean
isOCC()
boolean
isPrimaryKey(java.lang.String Name)
boolean
isSerializable()
Checks if there any JSON or CSV output maps.boolean
isUniqueIndexColumn(java.lang.String Name)
protected void
setupHistory(ParserSession PS, Schema ParentSchema)
To call after parent object has been validatedjava.lang.String
toString()
boolean
validate(ParserSession PS, Schema parentSchema)
-
Methods inherited from class tilda.parsing.parts.Base
expandColumnNames, expandColumnNames, getAppDataClassName, getAppFactoryClassName, getBaseClassName, getBaseName, getColumnPad, getFullName, getOutputMap, getQuery, getSchema, getShortName, hasMasking, validateMasks, validateOutputMaps, validateQueries
-
-
-
-
Field Detail
-
_OCC
@SerializedName("occ") public boolean _OCC
-
_TZFK
@SerializedName("tzFk") public java.lang.Boolean _TZFK
-
_TzModeStr
@SerializedName("tzMode") public java.lang.String _TzModeStr
-
_ETL
@SerializedName("etl") public boolean _ETL
-
_LCStr
@SerializedName("lc") public java.lang.String _LCStr
-
_CloneFrom
@SerializedName("cloneFrom") public ClonerFrom _CloneFrom
-
_CloneAs
@SerializedName("cloneAs") public Cloner[] _CloneAs
-
_Columns
@SerializedName("columns") public java.util.List<Column> _Columns
-
_PrimaryKey
@SerializedName("primary") public PrimaryKey _PrimaryKey
-
_ForeignKeys
@SerializedName("foreign") public java.util.List<ForeignKey> _ForeignKeys
-
_Indices
@SerializedName("indices") public java.util.List<Index> _Indices
-
_Http
@SerializedName("http") public HttpMapping[] _Http
-
_History
@SerializedName("history") public History _History
-
_HasUniqueIndex
public transient boolean _HasUniqueIndex
-
_HasNonUniqueIndex
public transient boolean _HasNonUniqueIndex
-
_HasNaturalIdentity
public transient boolean _HasNaturalIdentity
-
_FST
public transient FrameworkSourcedType _FST
-
_SourceView
public transient View _SourceView
-
_SourceObject
public transient Object _SourceObject
-
_LC
public transient ObjectLifecycle _LC
-
_TzMode
public transient TZMode _TzMode
-
_HistoryObj
public transient Object _HistoryObj
-
_Clones
public transient java.util.List<Object> _Clones
-
-
Constructor Detail
-
Object
public Object()
-
Object
public Object(Object obj)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getColumnNames
public java.lang.String[] getColumnNames()
- Specified by:
getColumnNames
in classBase
-
getLifecycle
public ObjectLifecycle getLifecycle()
- Specified by:
getLifecycle
in classBase
-
validate
public boolean validate(ParserSession PS, Schema parentSchema)
-
setupHistory
protected void setupHistory(ParserSession PS, Schema ParentSchema)
To call after parent object has been validated- Parameters:
PS
-ParentSchema
-
-
getHistoryObject
public Object getHistoryObject()
-
isAutoGenPrimaryKey
public boolean isAutoGenPrimaryKey(Column C)
A Column is an autogen PK if and only if it is the one column defined by the PK. All AutoGen PKs must have only one column (and also be a LONG).- Parameters:
C
-- Returns:
-
isPrimaryKey
public boolean isPrimaryKey(java.lang.String Name)
-
isUniqueIndexColumn
public boolean isUniqueIndexColumn(java.lang.String Name)
-
getDefaultCreateColumns
public java.util.List<Column> getDefaultCreateColumns()
-
getDefaultUpdateColumns
public java.util.List<Column> getDefaultUpdateColumns()
-
getCopyToColumns
public java.util.List<Column> getCopyToColumns()
-
getCreateColumns
public java.util.List<Column> getCreateColumns()
-
getJsonColumns
public java.util.List<Column> getJsonColumns()
-
addForeignKey
protected void addForeignKey(java.lang.String Name, java.lang.String[] ColumnNames, java.lang.String DestinationObject)
-
isAutoGenForeignKey
public boolean isAutoGenForeignKey(java.lang.String Name)
-
getForeignKeys
public java.util.List<ForeignKey> getForeignKeys(java.lang.String targetSchema, java.lang.String TargetObject)
-
getForeignKeys
public java.util.List<ForeignKey> getForeignKeys(Column Col)
-
isJsonable
public boolean isJsonable()
Checks if there any JSON output maps- Returns:
-
isCSVable
public boolean isCSVable()
Checks if there any CSV output maps- Returns:
-
isSerializable
public boolean isSerializable()
Checks if there any JSON or CSV output maps. If more methods of serializations are added in the future, this method will add extra checks.- Returns:
-
addQuery
public void addQuery(SubWhereClause SWC)
-
addQueries
public void addQueries(java.util.List<SubWhereClause> Queries)
-
getFirstIdentityColumns
public java.util.List<Column> getFirstIdentityColumns(boolean naturalIdentitiesFirst)
Returns the list of columns that represent the first identity of the object. If a PK is defined, the columns defined for it will be returned. Otherwise, the columns for the first defined unique index will be returned. Null is returned otherwise, but that should never happen because all Objects are required to have at least one identity.
If naturalIdentitiesFirst is true though, natural identities will be privileged first and the autogen PK will be returned only if there are no natural identities.
A natural identity is defined as a unique index, of a non-autogen primary key.
This method should only be called AFTERvalidate(ParserSession, Schema)
has been called first.- Returns:
-
getFirstIdentityColumnNames
public java.lang.String[] getFirstIdentityColumnNames(boolean naturalIdentitiesFirst)
Description copied from class:Base
Returns the list of columns that represent the first identity of the object. If a PK is defined, the columns defined for it will be returned. Otherwise, the columns for the first defined unique index will be returned. Null is returned otherwise, that that should never happen because all Objects are required to have at least one identity.
This method should only be called AFTERvalidate(ParserSession, Schema)
has been called first.- Specified by:
getFirstIdentityColumnNames
in classBase
- Returns:
-
getIndex
public Index getIndex(java.lang.String name)
-
hasAutos
public boolean hasAutos()
-
hasCollectionColumn
public boolean hasCollectionColumn()
-
hasCollectionQuery
public boolean hasCollectionQuery()
-
-