public class ERXQueryEOAttribute extends EOAttribute
This subclass of EOAttribute allows you to define attributes with a definition such as "COUNT(DISTINCT lineItems.lineItemID)" that can later be used with ERXQuery.
What makes this class different from EOAttribute is that you do not have to add the attribute to the entity but you do have to tell the attribute what entity to use via the setAdHocEntity() method. The entity is used when looking up the properties referenced in the definition of the attribute, i.e. "SUM(lineItems.extendedAmount)".
Instances of this class can be used with ERXQuery's select() and groupBy() methods. Their names can be referenced by the orderings passed into the orderBy() method and by qualifiers passed into the where() and having() methods.
This class provides a factory method to create an instance of this class which encapsulates the correct order in which the name, entity, prototype and definition must be set for the attribute to work properly during SQL generation.
_adaptorValueConversionClass, _adaptorValueConversionClassName, _adaptorValueConversionMethod, _adaptorValueConversionMethodName, _adaptorValueType, _className, _columnName, _definitionArray, _externalType, _flags_allowsNull, _flags_isNonUpdateable, _flags_isNonUpdateableInitialized, _flags_isReadOnly, _internalInfo, _name, _parameterDirection, _parent, _parentStoredProcedure, _precision, _prototype, _prototypeName, _readFormat, _scale, _serverTimeZone, _sourceToDestinationKeyMap, _userInfo, _valueClass, _valueClassName, _valueFactoryClass, _valueFactoryClassName, _valueFactoryMethod, _valueFactoryMethodName, _valueType, _valueTypeClassName, _VTBigDecimal, _VTBoolean, _VTByte, _VTCharStream, _VTCharTrimString, _VTCoerceDate, _VTDate, _VTDouble, _VTEncodedBytes, _VTFloat, _VTInteger, _VTLong, _VTShort, _VTString, _VTTime, _VTTimestamp, _VTUnknown, _width, _writeFormat, AdaptorBytesType, AdaptorCharactersType, AdaptorDateType, AdaptorNumberType, FactoryMethodArgumentIsBytes, FactoryMethodArgumentIsBytesString, FactoryMethodArgumentIsData, FactoryMethodArgumentIsDataString, FactoryMethodArgumentIsDate, FactoryMethodArgumentIsDateString, FactoryMethodArgumentIsString, FactoryMethodArgumentIsStringString, InOutParameter, InParameter, OutParameter, Void
Constructor and Description |
---|
ERXQueryEOAttribute() |
Modifier and Type | Method and Description |
---|---|
static ERXQueryEOAttribute |
create(com.webobjects.eoaccess.EOEntity entity,
String name,
String definition,
EOAttribute similarAttribute) |
static EOAttribute |
create(com.webobjects.eoaccess.EOEntity entity,
String name,
String definition,
String prototypeAttributeName)
Creates an instance of this class with the given name, definition and prototype
attribute name.
|
protected void |
setAdHocEntity(com.webobjects.eoaccess.EOEntity entity) |
void |
setDefinition(String definition)
Override to make sure that simple definitions like "SYSDATE" work okay.
|
_adaptorValueClass, _definitionArray, _factoryMethodArgumentTypeFromString, _flushCache, _hasAnyOverrides, _internalInfo, _isNonUpdateable, _isPrimaryKeyClassProperty, _normalizeDefinitionPath, _objectForPlist, _removeFromEntityArraySelector, _resetPrototype, _setDefinitionArray, _setDefinitionWithoutFlushingCaches, _setInternalInfo, _setNewFormatStringOld, _setOverrideForCharacteristic, _setSourceToDestinationKeyMap, _setValuesFromTargetAttribute, _sourceToDestinationKeyMap, _stringForFactoryMethodArgumentType, _toString, _updateFromPrototype, _valueTypeChar, adaptorValueByConvertingAttributeValue, adaptorValueClass, adaptorValueConversionClass, adaptorValueConversionClassName, adaptorValueConversionMethod, adaptorValueConversionMethodName, adaptorValueType, allowsNull, awakeWithPropertyList, beautifyName, changeNotificationOptions, className, columnName, definition, encodeIntoPropertyList, entity, externalType, factoryMethodArgumentType, isDerived, isFlattened, isReadOnly, name, newValueForBytes, newValueForBytesString, newValueForDate, newValueForImmutableBytes, newValueForString, overridesPrototypeDefinitionForCharacteristic, overridesPrototypeDefinitionForKey, overwrittenCharacteristics, parameterDirection, parent, precision, prototype, prototypeName, readFormat, relationshipPath, scale, serverTimeZone, setAdaptorValueConversionClassName, setAdaptorValueConversionMethodName, setAllowsNull, setChangeNotificationOptions, setClassName, setColumnName, setExternalType, setFactoryMethodArgumentType, setName, setParameterDirection, setPrecision, setPrototype, setReadFormat, setReadOnly, setScale, setServerTimeZone, setUserInfo, setValueClassName, setValueFactoryClassName, setValueFactoryMethodName, setValueType, setWidth, setWriteFormat, storedProcedure, toString, userInfo, validateValue, valueClassName, valueFactoryClass, valueFactoryClassName, valueFactoryMethod, valueFactoryMethodName, valueForSQLExpression, valueType, valueTypeClassName, width, writeFormat
protected void setAdHocEntity(com.webobjects.eoaccess.EOEntity entity)
public void setDefinition(String definition)
setDefinition
in class EOAttribute
public static EOAttribute create(com.webobjects.eoaccess.EOEntity entity, String name, String definition, String prototypeAttributeName)
EOAttribute attr =
ERXQueryEOAttribute.create(
claimEntity, "totalExpectedAmount", "SUM(expectedAmount)", "currencyAmount2"
);
public static ERXQueryEOAttribute create(com.webobjects.eoaccess.EOEntity entity, String name, String definition, EOAttribute similarAttribute)
Copyright © 2002 – 2020 Project Wonder.