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[]_CloneAsClonerFrom_CloneFromjava.util.List<Object>_Clonesjava.util.List<Column>_Columnsboolean_ETLjava.util.List<ForeignKey>_ForeignKeysFrameworkSourcedType_FSTboolean_HasNaturalIdentityboolean_HasNonUniqueIndexboolean_HasUniqueIndexHistory_HistoryObject_HistoryObjHttpMapping[]_Httpjava.util.List<Index>_IndicesObjectLifecycle_LCjava.lang.String_LCStrboolean_OCCPrimaryKey_PrimaryKeyObject_SourceObjectView_SourceViewjava.lang.Boolean_TZFKTZMode_TzModejava.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 voidAddColumnAfter(Column SiblingCol, Column NewCol)protected voidaddForeignKey(java.lang.String Name, java.lang.String[] ColumnNames, java.lang.String DestinationObject)voidaddQueries(java.util.List<SubWhereClause> Queries)voidaddQuery(SubWhereClause SWC)ColumngetColumn(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)ObjectgetHistoryObject()IndexgetIndex(java.lang.String name)java.util.List<Column>getJsonColumns()ObjectLifecyclegetLifecycle()booleanhasAutos()booleanhasCollectionColumn()booleanhasCollectionQuery()booleanisAutoGenForeignKey(java.lang.String Name)booleanisAutoGenPrimaryKey(Column C)A Column is an autogen PK if and only if it is the one column defined by the PK.booleanisCSVable()Checks if there any CSV output mapsbooleanisJsonable()Checks if there any JSON output mapsbooleanisOCC()booleanisPrimaryKey(java.lang.String Name)booleanisSerializable()Checks if there any JSON or CSV output maps.booleanisUniqueIndexColumn(java.lang.String Name)protected voidsetupHistory(ParserSession PS, Schema ParentSchema)To call after parent object has been validatedjava.lang.StringtoString()booleanvalidate(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:
toStringin classjava.lang.Object
-
getColumnNames
public java.lang.String[] getColumnNames()
- Specified by:
getColumnNamesin classBase
-
getLifecycle
public ObjectLifecycle getLifecycle()
- Specified by:
getLifecyclein 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:BaseReturns 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:
getFirstIdentityColumnNamesin classBase- Returns:
-
getIndex
public Index getIndex(java.lang.String name)
-
hasAutos
public boolean hasAutos()
-
hasCollectionColumn
public boolean hasCollectionColumn()
-
hasCollectionQuery
public boolean hasCollectionQuery()
-
-