Package adalid.core
Class AbstractExpression
- java.lang.Object
-
- adalid.core.AbstractArtifact
-
- adalid.core.AbstractExpression
-
- All Implemented Interfaces:
Wrappable,Artifact,Expression,NaryExpression,NaryOperation,TypedArtifact
- Direct Known Subclasses:
AbstractComparisonX,AbstractConditionalX,AbstractDataAggregateX,AbstractNaryVectorX,AbstractOrderedPairX,AbstractRowsAggregateX,AbstractScalarX,VariantX
public abstract class AbstractExpression extends AbstractArtifact implements NaryExpression
- Author:
- Jorge Campins
-
-
Field Summary
-
Fields inherited from class adalid.core.AbstractArtifact
_de_, _of_, BR, ENGLISH, FWGTS, FWLTS, HT, PORTUGUESE, SPANISH
-
-
Constructor Summary
Constructors Constructor Description AbstractExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckArguments()protected voidcheckUnusualArguments(java.lang.String expression, org.apache.log4j.Level level)protected voidcheckUnusualInstance(java.lang.String expression, org.apache.log4j.Level level, Instance argument)protected voidcopyDataType(java.lang.Object object)protected java.lang.StringfieldsToString(int n, java.lang.String key, boolean verbose, boolean fields, boolean maps)booleanfinalise()dot the i's and cross the t'sjava.util.List<Property>getCorrespondingReferencedColumnsList(QueryTable searchQueryTable1, QueryTable searchQueryTable2)java.lang.StringgetCrossReferencedExpressionsKey()java.util.Set<java.lang.String>getCrossReferencedExpressionsSet()java.util.Set<java.lang.String>getCrossReferencedExpressionsSet(Entity declaringEntity)java.lang.Class<?>getDataType()java.lang.Class<? extends ExpressionWrapper>getDefaultWrapperClass()java.lang.StringgetExpressionString()java.util.List<Operation>getFinalStateBusinessOperationsList()ExpressiongetForeignExpression()java.lang.reflect.FieldgetForeignExpressionField()java.lang.StringgetForeignExpressionName()java.lang.Class<?>getForeignExpressionType()java.util.List<Operation>getInitialStateBusinessOperationsList()protected java.lang.Class<?>getObjectDataType(java.lang.Object object)ExpressiongetParentExpression()java.util.List<Property>getReferencedColumnsList()java.util.Map<java.lang.String,Property>getReferencedColumnsMap()java.util.List<QueryJoin>getReferencedJoinsList()java.util.List<QueryJoin>getReferencedJoinsList(QueryTable queryTable)java.util.Map<java.lang.String,QueryJoin>getReferencedJoinsMap()java.util.Map<java.lang.String,QueryJoin>getReferencedJoinsMap(QueryTable queryTable)java.util.Set<java.lang.String>getStringsSet()java.util.List<ExpressionUsage>getVerifiedUsages()booleanisBooleanExpression()booleanisCharacterExpression()booleanisComparisonExpression()booleanisConditionalExpression()booleanisCrossReferencedExpression()booleanisDataAggregateExpression()booleanisEntityExpression()booleanisLogicalTautology()booleanisNumericExpression()booleanisOrderedPairExpression()booleanisRowsAggregateExpression()booleanisScalarExpression()booleanisSingleEntityExpression()booleanisSingleEntityExpression(Entity declaringEntity)booleanisTemporalExpression()booleanisVariantExpression()protected voidsetDataType(java.lang.Class<?> dataType)protected voidsetForeignExpressionField(java.lang.reflect.Field foreignExpressionField)voidsetLogicalTautology(boolean tautology)-
Methods inherited from class adalid.core.AbstractArtifact
a, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttributes, annotate, b, b, bigDecimal, bigInteger, checkName, classToString, clearAttributes, coalesce, copyLocalizedStrings, defaultLocale, depth, fa, finish, getAlias, getAttribute, getAttribute, getAttributes, getAttributesArray, getAttributesArray, getAttributesKeySetByRegex, getBooleanAttribute, getBooleanAttribute, getClassPath, getDeclaringArtifact, getDeclaringEntity, getDeclaringEntityRoot, getDeclaringField, getDeclaringFieldEntityRoot, getDeclaringFieldIndex, getDeclaringFieldNamedClassSimpleName, getDeclaringFieldPersistentEntityRoot, getDeclaringFieldPersistentEntityTableRoot, getDeclaringOperation, getDeclaringPersistentEntity, getDeclaringPersistentEntityRoot, getDefaultCollectionLabel, getDefaultCollectionShortLabel, getDefaultDescription, getDefaultLabel, getDefaultLocale, getDefaultShortDescription, getDefaultShortLabel, getDefaultSymbol, getDefaultTooltip, getFullName, getIntegerAttribute, getIntegerAttribute, getIntegerAttribute, getIntegerAttribute, getKeyValuePairAttribute, getKeyValuePairAttribute, getKeyValuePairAttribute, getKeyValuePairAttribute, getLocalizedCollectionLabel, getLocalizedCollectionShortLabel, getLocalizedDescription, getLocalizedLabel, getLocalizedShortDescription, getLocalizedShortLabel, getLocalizedSymbol, getLocalizedTooltip, getName, getPartialName, getPathList, getPathString, getSqlName, getStringAttribute, getStringAttribute, getStringAttribute, getStringAttribute, getStringKeyValuePairAttribute, getStringKeyValuePairAttribute, getTrace, getValidFieldAnnotations, getValidTypeAnnotations, getValueString, getValueString, getWrapper, greaterThanZero, h1, h2, h3, h4, h5, h6, hashCodeHexString, i, i, ic, ic, isAnnotated, isClassInPath, isDeclared, isExpression, isFinalised, isFinished, isFontAwesomeClass, isInherited, isInheritedFromAbstract, isInheritedFromConcrete, isLocalizedSymbolDefined, isNotDeclared, isNotInherited, isNotInheritedFromAbstract, isNotInheritedFromConcrete, isOperation, isUnicodeSymbolClass, isValidEmbeddedDocument, isValidFieldAnnotation, isValidHelpFileName, isValidHelpFileType, isValidJavaClassName, isValidSnippetFileName, isValidTypeAnnotation, localeReadingKey, localeWritingKey, m, m, mapsToString, put, round, s, s, setAlias, setDefaultCollectionLabel, setDefaultCollectionShortLabel, setDefaultDescription, setDefaultLabel, setDefaultShortDescription, setDefaultShortLabel, setDefaultSymbol, setDefaultTooltip, setLocalizedCollectionLabel, setLocalizedCollectionShortLabel, setLocalizedDescription, setLocalizedLabel, setLocalizedShortDescription, setLocalizedShortLabel, setLocalizedSymbol, setLocalizedTooltip, setSqlName, setStaticAttributes, settler, setTrace, specified, specified, specified, specified, specified, specified, specified, toString, toString, toString, toString, toString, u, u, ul, verifyExpression, verifyExpression, verifyExpression, verifyExpression, verifyExpression, verifyExpression, verifyNames, xs
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adalid.core.interfaces.Artifact
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttributes, clearAttributes, depth, finish, getAlias, getAttribute, getAttribute, getClassPath, getDeclaringArtifact, getDeclaringEntity, getDeclaringEntityRoot, getDeclaringField, getDeclaringFieldEntityRoot, getDeclaringFieldIndex, getDeclaringFieldPersistentEntityRoot, getDeclaringFieldPersistentEntityTableRoot, getDeclaringOperation, getDeclaringPersistentEntity, getDeclaringPersistentEntityRoot, getDefaultCollectionLabel, getDefaultCollectionShortLabel, getDefaultDescription, getDefaultLabel, getDefaultLocale, getDefaultShortDescription, getDefaultShortLabel, getDefaultSymbol, getDefaultTooltip, getFullName, getLocalizedCollectionLabel, getLocalizedCollectionShortLabel, getLocalizedDescription, getLocalizedLabel, getLocalizedShortDescription, getLocalizedShortLabel, getLocalizedSymbol, getLocalizedTooltip, getName, getPartialName, getPathList, getPathString, getSqlName, hashCodeHexString, isAnnotated, isClassInPath, isDeclared, isExpression, isFinalised, isFinished, isInherited, isInheritedFromAbstract, isInheritedFromConcrete, isNotDeclared, isNotInherited, isNotInheritedFromAbstract, isNotInheritedFromConcrete, isOperation, put, round, setAlias, setDefaultCollectionLabel, setDefaultCollectionShortLabel, setDefaultDescription, setDefaultLabel, setDefaultShortDescription, setDefaultShortLabel, setDefaultSymbol, setDefaultTooltip, setLocalizedCollectionLabel, setLocalizedCollectionShortLabel, setLocalizedDescription, setLocalizedLabel, setLocalizedShortDescription, setLocalizedShortLabel, setLocalizedSymbol, setLocalizedTooltip, setSqlName, toString, toString, toString, toString
-
Methods inherited from interface adalid.core.interfaces.Expression
getOperands, getOperator
-
Methods inherited from interface adalid.core.interfaces.NaryOperation
getOperands, getOperator
-
-
-
-
Method Detail
-
getInitialStateBusinessOperationsList
public java.util.List<Operation> getInitialStateBusinessOperationsList()
-
getFinalStateBusinessOperationsList
public java.util.List<Operation> getFinalStateBusinessOperationsList()
-
getDataType
public java.lang.Class<?> getDataType()
- Specified by:
getDataTypein interfaceTypedArtifact- Returns:
- the data type
-
setDataType
protected void setDataType(java.lang.Class<?> dataType)
- Parameters:
dataType- the type to set
-
getParentExpression
public Expression getParentExpression()
- Specified by:
getParentExpressionin interfaceExpression- Returns:
- the parent expression
-
getForeignExpressionField
public java.lang.reflect.Field getForeignExpressionField()
- Returns:
- the foreign expression field
-
setForeignExpressionField
protected void setForeignExpressionField(java.lang.reflect.Field foreignExpressionField)
- Parameters:
foreignExpressionField- the foreign expression field to set
-
getForeignExpressionName
public java.lang.String getForeignExpressionName()
- Returns:
- the foreign expression name
-
getForeignExpressionType
public java.lang.Class<?> getForeignExpressionType()
- Returns:
- the foreign expression type
-
getVerifiedUsages
public java.util.List<ExpressionUsage> getVerifiedUsages()
- Specified by:
getVerifiedUsagesin interfaceExpression- Returns:
- the verified usages
-
isLogicalTautology
public boolean isLogicalTautology()
-
setLogicalTautology
public void setLogicalTautology(boolean tautology)
-
getStringsSet
public java.util.Set<java.lang.String> getStringsSet()
- Specified by:
getStringsSetin interfaceExpression- Returns:
- the strings set
-
getReferencedColumnsList
public java.util.List<Property> getReferencedColumnsList()
- Specified by:
getReferencedColumnsListin interfaceExpression- Returns:
- the referenced columns list
-
getCorrespondingReferencedColumnsList
public java.util.List<Property> getCorrespondingReferencedColumnsList(QueryTable searchQueryTable1, QueryTable searchQueryTable2)
-
getReferencedColumnsMap
public java.util.Map<java.lang.String,Property> getReferencedColumnsMap()
- Specified by:
getReferencedColumnsMapin interfaceExpression- Returns:
- the referenced columns map
-
getReferencedJoinsList
public java.util.List<QueryJoin> getReferencedJoinsList()
- Specified by:
getReferencedJoinsListin interfaceExpression- Returns:
- the referenced joins list
-
getReferencedJoinsList
public java.util.List<QueryJoin> getReferencedJoinsList(QueryTable queryTable)
- Specified by:
getReferencedJoinsListin interfaceExpression- Parameters:
queryTable- query table- Returns:
- the referenced joins list
-
getReferencedJoinsMap
public java.util.Map<java.lang.String,QueryJoin> getReferencedJoinsMap()
- Specified by:
getReferencedJoinsMapin interfaceExpression- Returns:
- the referenced joins map
-
getReferencedJoinsMap
public java.util.Map<java.lang.String,QueryJoin> getReferencedJoinsMap(QueryTable queryTable)
- Specified by:
getReferencedJoinsMapin interfaceExpression- Parameters:
queryTable- query table- Returns:
- the referenced joins map
-
getCrossReferencedExpressionsSet
public java.util.Set<java.lang.String> getCrossReferencedExpressionsSet()
- Specified by:
getCrossReferencedExpressionsSetin interfaceExpression- Returns:
- the referenced expressions map
-
getCrossReferencedExpressionsSet
public java.util.Set<java.lang.String> getCrossReferencedExpressionsSet(Entity declaringEntity)
- Specified by:
getCrossReferencedExpressionsSetin interfaceExpression- Parameters:
declaringEntity- declaring entity- Returns:
- the referenced expressions map
-
getCrossReferencedExpressionsKey
public java.lang.String getCrossReferencedExpressionsKey()
- Specified by:
getCrossReferencedExpressionsKeyin interfaceExpression
-
isCrossReferencedExpression
public boolean isCrossReferencedExpression()
- Specified by:
isCrossReferencedExpressionin interfaceExpression
-
isSingleEntityExpression
public boolean isSingleEntityExpression()
- Specified by:
isSingleEntityExpressionin interfaceExpression- Returns:
- true if is a TemporalExpression; otherwise false
-
isSingleEntityExpression
public boolean isSingleEntityExpression(Entity declaringEntity)
- Specified by:
isSingleEntityExpressionin interfaceExpression- Parameters:
declaringEntity- declaring entity- Returns:
- true if is a TemporalExpression; otherwise false
-
isBooleanExpression
public boolean isBooleanExpression()
- Returns:
- true if is a BooleanExpression; otherwise false
-
isCharacterExpression
public boolean isCharacterExpression()
- Returns:
- true if is a CharacterExpression; otherwise false
-
isEntityExpression
public boolean isEntityExpression()
- Returns:
- true if is a EntityExpression; otherwise false
-
isNumericExpression
public boolean isNumericExpression()
- Returns:
- true if is a NumericExpression; otherwise false
-
isTemporalExpression
public boolean isTemporalExpression()
- Returns:
- true if is a TemporalExpression; otherwise false
-
isComparisonExpression
public boolean isComparisonExpression()
- Returns:
- true if is a ComparisonX; otherwise false
-
isConditionalExpression
public boolean isConditionalExpression()
- Returns:
- true if is a ConditionalX; otherwise false
-
isDataAggregateExpression
public boolean isDataAggregateExpression()
- Returns:
- true if is a DataAggregateX; otherwise false
-
isOrderedPairExpression
public boolean isOrderedPairExpression()
- Returns:
- true if is a OrderedPairX; otherwise false
-
isRowsAggregateExpression
public boolean isRowsAggregateExpression()
- Returns:
- true if is a RowsAggregateX; otherwise false
-
isScalarExpression
public boolean isScalarExpression()
- Returns:
- true if is a ScalarX; otherwise false
-
isVariantExpression
public boolean isVariantExpression()
- Returns:
- true if is a TemporalExpression; otherwise false
-
finalise
public boolean finalise()
Description copied from interface:Artifactdot the i's and cross the t's- Specified by:
finalisein interfaceArtifact- Overrides:
finalisein classAbstractArtifact- Returns:
- true if this artifact was successfully finalised; otherwise false
-
checkArguments
protected void checkArguments()
-
checkUnusualArguments
protected void checkUnusualArguments(java.lang.String expression, org.apache.log4j.Level level)
-
checkUnusualInstance
protected void checkUnusualInstance(java.lang.String expression, org.apache.log4j.Level level, Instance argument)
-
copyDataType
protected void copyDataType(java.lang.Object object)
-
getObjectDataType
protected java.lang.Class<?> getObjectDataType(java.lang.Object object)
-
getForeignExpression
public Expression getForeignExpression()
-
getDefaultWrapperClass
public java.lang.Class<? extends ExpressionWrapper> getDefaultWrapperClass()
- Specified by:
getDefaultWrapperClassin interfaceWrappable- Overrides:
getDefaultWrapperClassin classAbstractArtifact- Returns:
- the default wrapper class
-
getExpressionString
public java.lang.String getExpressionString()
- Specified by:
getExpressionStringin interfaceExpression- Returns:
- the pseudo-expression
-
fieldsToString
protected java.lang.String fieldsToString(int n, java.lang.String key, boolean verbose, boolean fields, boolean maps)- Overrides:
fieldsToStringin classAbstractArtifact
-
-