Package pl.decerto.hyperon.runtime.model
Class HyperonDomainObjectImpl
java.lang.Object
pl.decerto.hyperon.runtime.model.HyperonDomainObjectImpl
- All Implemented Interfaces:
Comparable<HyperonDomainObjectImpl>,HyperonDomainObject
public class HyperonDomainObjectImpl
extends Object
implements HyperonDomainObject, Comparable<HyperonDomainObjectImpl>
Klasa przechowuje dane produktu. W przypadku odczytu pełnych danych produktu cała jego struktura
jest zachowana w sekwencji atrybutów children, tzn. lista dzieci ma w sobie kolejną listę dzieci
itd. aż do wypełnienia pełnej struktury.
- Author:
- Ania
-
Constructor Summary
ConstructorsConstructorDescriptionWykorzystywany do utworzenia specjalnego obiektu przechowującego obiekty rootHyperonDomainObjectImpl(Integer id, String code, String name, String description, HyperonDomainObjectTypeImpl type, Integer parentId, boolean head) Do utworzenia obiektu odczytanego z bazy -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllTags(List<Tag> tagList) voidaddChildren(List<HyperonDomainObjectImpl> children) voidaddReference(HyperonDomainObjectImpl referenced, String referenceInCollectionCode) voidintbooleanbooleangetAttrBoolean(String code, HyperonContext ctx) getAttrDate(String code, HyperonContext ctx) getAttrDecimal(String code, HyperonContext ctx) getAttribute(String code) getAttribute(String path, String attributeCode) getAttributeValue(String path, String attributeCode, ParamContext ctx, Object... args) getAttrInteger(String code, HyperonContext ctx) doublegetAttrNumber(String code, HyperonContext ctx) getAttrString(String code, HyperonContext ctx) path to this object in the form in which it was used (the object can be reached using different paths).getChildren(String propCode) calculates and returns element's digest.getDynamicAttribute(String code) getFromAllAttributes(String code) getReferenceCollectionCode(Integer referenceId) static IntegergetTmpId()inthashCode()booleanbooleanisAttrDefined(String code) booleanbooleanisLocalAttr(String code) booleanisRealChild(Integer id) booleanisReferenceInCollection(String collectionCode, Integer id) booleanisRoot()voidreload(HyperonDomainObject child) voidvoidsetAttributes(List<HyperonDomainAttribute> attributes) UWAGA: jedne miejsce, ktore modyfikuje kolekcje [attributes]voidsetChildren(List<HyperonDomainObjectImpl> children) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.decerto.hyperon.runtime.model.HyperonDomainObject
getAttributes, getCode, getDescription, getId, getName, getParentId, getPath, getRegion
-
Constructor Details
-
HyperonDomainObjectImpl
public HyperonDomainObjectImpl()Wykorzystywany do utworzenia specjalnego obiektu przechowującego obiekty root -
HyperonDomainObjectImpl
public HyperonDomainObjectImpl(Integer id, String code, String name, String description, HyperonDomainObjectTypeImpl type, Integer parentId, boolean head) Do utworzenia obiektu odczytanego z bazy- Parameters:
id- idcode- codename- namedescription- descriptiontype- type - HyperonDomainObjectTypeImpl objectparentId- parent idhead- is head control flag
-
-
Method Details
-
getDomain
- Specified by:
getDomainin interfaceHyperonDomainObject
-
getTypeCollection
- Specified by:
getTypeCollectionin interfaceHyperonDomainObject- Returns:
- collection type of HyperonDomainObjectType object
-
getTagList
- Specified by:
getTagListin interfaceHyperonDomainObject- Returns:
- collection with tags attached to domain object
-
getDigest
Description copied from interface:HyperonDomainObjectcalculates and returns element's digest. It includes element's code, type code, attributes digests and region info, if element is attached- Specified by:
getDigestin interfaceHyperonDomainObject- Returns:
- domain element's digest
-
getTagsName
-
addAllTags
-
isRoot
public boolean isRoot()- Specified by:
isRootin interfaceHyperonDomainObject
-
isAttrDefined
- Specified by:
isAttrDefinedin interfaceHyperonDomainObject
-
isLocalAttr
- Specified by:
isLocalAttrin interfaceHyperonDomainObject
-
getAttr
- Specified by:
getAttrin interfaceHyperonDomainObject- Parameters:
code- code- Returns:
- attribute of type HyperonDomainAttribute
-
getAttrString
- Specified by:
getAttrStringin interfaceHyperonDomainObject- Parameters:
code- attribute codectx- context- Returns:
- attribute as String object
-
getAttrDecimal
- Specified by:
getAttrDecimalin interfaceHyperonDomainObject- Parameters:
code- attribute codectx- context- Returns:
- attribute as BigDecimal object
-
getAttrNumber
- Specified by:
getAttrNumberin interfaceHyperonDomainObject- Parameters:
code- attribute codectx- context- Returns:
- attribute as double value
-
getAttrInteger
- Specified by:
getAttrIntegerin interfaceHyperonDomainObject- Parameters:
code- attribute codectx- context- Returns:
- attribute as Integer object
-
getAttrDate
- Specified by:
getAttrDatein interfaceHyperonDomainObject- Parameters:
code- attribute codectx- context- Returns:
- attribute as Data object
-
getAttrBoolean
- Specified by:
getAttrBooleanin interfaceHyperonDomainObject- Parameters:
code- attribute codectx- context- Returns:
- attribute as boolean value
-
getTypeName
- Specified by:
getTypeNamein interfaceHyperonDomainObject
-
getTypeCode
- Specified by:
getTypeCodein interfaceHyperonDomainObject
-
getAttribute
- Specified by:
getAttributein interfaceHyperonDomainObject
-
getDynamicAttribute
- Specified by:
getDynamicAttributein interfaceHyperonDomainObject
-
getFromAllAttributes
- Specified by:
getFromAllAttributesin interfaceHyperonDomainObject- Parameters:
code- attribute code to look for- Returns:
- found attribute or
Optional.empty()if not found
-
getDynamicAttributes
- Specified by:
getDynamicAttributesin interfaceHyperonDomainObject
-
getChild
- Specified by:
getChildin interfaceHyperonDomainObject
-
getChildren
- Specified by:
getChildrenin interfaceHyperonDomainObject
-
getParent
- Specified by:
getParentin interfaceHyperonDomainObject
-
hasParent
public boolean hasParent() -
getAttribute
- Specified by:
getAttributein interfaceHyperonDomainObject
-
getAttributeValue
public ParamValue getAttributeValue(String path, String attributeCode, ParamContext ctx, Object... args) - Specified by:
getAttributeValuein interfaceHyperonDomainObject
-
getCallPath
Description copied from interface:HyperonDomainObjectpath to this object in the form in which it was used (the object can be reached using different paths). path is normalized and has the form: / a / b / c- Specified by:
getCallPathin interfaceHyperonDomainObject- Returns:
- call path
-
setChildren
-
setAttributes
UWAGA: jedne miejsce, ktore modyfikuje kolekcje [attributes]- Parameters:
attributes- list with HyperonDomainAttribute objects
-
getFullElementCode
-
toString
-
hashCode
public int hashCode() -
equals
-
getCollection
-
addReference
-
getTypeNature
-
getCollectionType
-
isRealChild
-
isReferenceInCollection
-
getReferenceCollectionCode
-
compareTo
- Specified by:
compareToin interfaceComparable<HyperonDomainObjectImpl>
-
getTmpId
-
isAttrSet
- Specified by:
isAttrSetin interfaceHyperonDomainObject
-
removeChild
-
reload
-
getNotRefChildren
-
addChildren
-
getFullPath
-
addTag
-
getCollectionCodeOrNull
-