Interface DomainType
-
- All Known Subinterfaces:
EnumerateDomainType
,ForeignKeyDomainType
,PrimitiveDomainType
- All Known Implementing Classes:
AbsoluteDateTimeDomainType
,AbsoluteTimeDomainType
,BaseDomainType
,BaseEnumerateDomainType
,BaseForeignKeyDomainType
,BasePrimitiveDomainType
,BigDecimalDomainType
,BigDecimalDomainType.Amount
,BigDecimalDomainType.GeneralQuantity
,BigDecimalDomainType.Number
,BigDecimalDomainType.Price
,BigDecimalDomainType.Quantity
,BinaryDomainType
,BooleanDomainType
,ButtonDomainType
,DateDomainType
,DatetimeDomainType
,EncryptedStringDomainType
,HashedStringDomainType
,LongDomainType
,ModelElementDomainType
,ObjectDomainType
,OneToManyDomainType
,ProductCharacteristicsDomainType
,SearchDomainType
,SelectorDomainType
,StringDomainType
,StringEnumerateDomainType
,TableDirDomainType
,TableDomainType
,TimestampDomainType
,TreeDomainType
,UniqueIdDomainType
public interface DomainType
The ModelReference implements the reference extensions used for the Data Access Layer. See here for more information.- Author:
- mtaal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkIsValidValue(Property property, Object value)
Checks if a certain value is valid according to the type of the reference.void
checkObjectIsValid(BaseOBObjectDef obObject, Property property)
Checks if a certain property has a valid value taking into account other values in the object.ModelProvider
getModelProvider()
Reference
getReference()
void
initialize()
Is called during the initialization of the model layer.void
setModelProvider(ModelProvider modelProvider)
The reference classes are instantiated by theModelProvider
.void
setReference(Reference reference)
The ModelReference is instantiated for each reference record in AD_Reference.
-
-
-
Method Detail
-
setReference
void setReference(Reference reference)
The ModelReference is instantiated for each reference record in AD_Reference. When it is instantiated the original id of the reference record is passed in using this method.- Parameters:
reference
- the record for which the ModelReference is instantiated.
-
getReference
Reference getReference()
- Returns:
- the
Reference
record for which this instance is created.
-
setModelProvider
void setModelProvider(ModelProvider modelProvider)
The reference classes are instantiated by theModelProvider
. The ModelProvider can be used by the reference class to obtain other model related information.- Parameters:
modelProvider
- the ModelProvider instance responsible for building the internal and in-memory model.
-
getModelProvider
ModelProvider getModelProvider()
- Returns:
- the ModelProvider used in this instance
-
initialize
void initialize()
Is called during the initialization of the model layer. Is called after thesetModelProvider(ModelProvider)
. Note: any subclass should clean-up and close database connections or hibernate sessions. If this is not done then the update.database task may hang when disabling foreign keys.
-
checkIsValidValue
void checkIsValidValue(Property property, Object value) throws ValidationException
Checks if a certain value is valid according to the type of the reference.- Parameters:
property
- the property which has this valuevalue
- the value- Throws:
ValidationException
-
checkObjectIsValid
void checkObjectIsValid(BaseOBObjectDef obObject, Property property) throws ValidationException
Checks if a certain property has a valid value taking into account other values in the object.- Parameters:
obObject
- the overall object to checkproperty
- the property to check- Throws:
ValidationException
-
-