Class StoredObject
- All Implemented Interfaces:
Displayable
,StringFiller
,HasId
- Direct Known Subclasses:
AbstractCheckList
,AccessControl
,Account
,AccountChart
,AccountChartMap
,AccountConfiguration
,AccountEntity
,AccountLimit
,ApplicableDataLogic
,Attachment
,AttachmentDefinition
,AuditTrailConfiguration
,AuditTrailLinkConfiguration
,AutoLogin
,BlockDisplayContent
,Bot
,Calendar
,CheckListTemplateItem
,ColumnDefinition
,Command
,ConnectorLogic
,Consignment
,ConsignmentItem
,ConsignmentPacket
,Consumption
,Contact
,ContactGroupingCode
,ContactType
,CurrencyRate
,CustomMessageLogic
,DashboardDefinition
,Data
,DataLogic
,DeveloperLog
,DeviceLayout
,DocumentConfiguration
,Entity
,EntityRole
,Entry
,Error
,ExchangeRate
,ExternalSystemUser
,ExtraInfoDefinition
,FileCirculation
,FileData
,FileFolder
,FileFolderAccessRights
,FullConsumption
,GlobalProperty
,IndexDefinition
,InventoryAPN
,InventoryAssembly
,InventoryGRN
,InventoryGRNItem
,InventoryItem
,InventoryItemType
,InventoryLedger
,InventoryLocation
,InventoryPO
,InventoryPOItem
,InventoryStore
,InventoryTransfer
,InventoryTransferItem
,InventoryUnitCorrection
,Invoice
,JavaInnerClass
,JournalVoucher
,JournalVoucherStage
,LandedCost
,LandedCostType
,LimitMessage
,LinkDefinition
,Log
,Logic
,LogicGroup
,LoginMessage
,MaterialIssued
,MaterialIssuedItem
,MaterialRequest
,MaterialRequestItem
,Memo
,MemoComment
,MemoType
,Message
,MessageEscalation
,MessageGroup
,MessageTemplate
,ModuleLogic
,MQTT
,Name
,ObjectPermission
,Packager
,PackingUnit
,ParameterLogic
,PasswordPolicy
,Person
,PersonRole
,PIN
,PrintLogicDefinition
,ProductSkill
,Provider
,PseudoTran
,PseudoTranApproval
,PseudoTranDetail
,ReportColumnDefinition
,ReportFormat
,ResourceCost
,Schedule
,Secret
,Sender
,SenderGroup
,SerialConfigurator
,SerialGenerator
,SerialPattern
,ServerInformation
,ServerLink
,Signature
,Site
,Statistics
,StreamData
,SupportPerson
,SupportUser
,SystemEntity
,SystemUser
,SystemUserGroup
,TableDefinition
,Tax
,TaxAccountConfiguration
,TaxDefinition
,TaxRate
,TextContent
,TransactionDate
,TransactionValueDate
,UIAction
,UIFieldMetadata
,UIMetadata
,UnitDefinition
,UnitItemType
,UnitType
,UnpostedJournal
,UnpostedJournalEntry
,UserRegistrationConfiguration
,ValueDefinition
,ValueImagePosition
,ValueStyle
,WebBiometric
Id
.- Author:
- Syam
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Add a given Id as a link to this instance.final void
Add a given Id as a link to this instance.final void
addLink
(StoredObject object) Add a given object as a link to this instance.final void
addLink
(StoredObject object, int linkType) Add a given object as a link to this instance.final void
addLink
(Transaction transaction, Id id) Add a given Id as a link to this instance.final void
addLink
(Transaction transaction, Id id, int linkType) Add a given Id as a link to this instance.final void
addLink
(Transaction transaction, StoredObject object) Add a given object as a link to this instance.final void
addLink
(Transaction transaction, StoredObject object, int linkType) Add a given object as a link to this instance.static String
checkCurrency
(String currencyCode) Validate the currency code passed.static String
checkCurrency
(String currencyCode, boolean includeMetals) Validate the currency code passed.final boolean
Checks if a duplicate entry exists in the database or not.final void
checkForDuplicate
(String... attributes) Checks if a duplicate entry exists in the database or not.static String
checkTimeZone
(String timeZone) Validate the time zone passed.final void
Check whether this instance is in a valid transaction.final void
Clear all object links associated with this instance.contemporary
(StoredObject other) Get the contemporary version of this instance with respect to another object instance.copy()
Return a copy of this instance.boolean
copy
(StoredObject another) Copy the given object instance to this instance.static int
count
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) Count the number of instances for the given set of parameters.static int
count
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the number of instances for the given set of parameters.static int
count
(Class<? extends StoredObject> objectClass) Count the number of instances for the given set of parameters.static int
count
(Class<? extends StoredObject> objectClass, boolean any) Count the number of instances for the given set of parameters.static int
count
(Class<? extends StoredObject> objectClass, String condition) Count the number of instances for the given set of parameters.static int
count
(Class<? extends StoredObject> objectClass, String condition, boolean any) Count the number of instances for the given set of parameters.final int
countLinks
(int linkType, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.final int
countLinks
(int linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(int linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.final int
countLinks
(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.final int
countLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Class<? extends StoredObject> objectClass) Count the links of this instance for the given parameter.final int
countLinks
(Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.final int
countLinks
(Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(String linkType, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.final int
countLinks
(String linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.final int
countLinks
(String linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.final int
countLinks
(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.final int
countMasters
(int linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(int linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(int linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(String linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(String linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(String linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.final int
countMasters
(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.static StoredObject
Create an instance from the given reader.final boolean
created()
Is this instance just created?final void
delete()
Delete this instance from the database.final void
delete
(Transaction transaction) Delete this instance from the database.final boolean
Delete an instance in the database.final boolean
deleted()
Is this instance deleted in the database?final void
Do direct update without creating a transaction.final boolean
static boolean
Check the existence of any instances for the given set of parameters.static boolean
exists
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) Check the existence of any instances for the given set of parameters.static boolean
exists
(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of any instances for the given set of parameters.static boolean
exists
(Class<? extends StoredObject> objectClass, String condition) Check the existence of any instances for the given set of parameters.static boolean
exists
(Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of any instances for the given set of parameters.final boolean
Check if any "file data"FileData
exists as attachment under this instance or not.boolean
existsLink
(int linkType, Id linkId) Check the existence of the link under this instance for the given parameters.boolean
existsLink
(int linkType, StoredObject link) Check the existence of links under this instance for the given parameters.boolean
existsLink
(Id linkId) Check the existence of the link under this instance for the given parameter.boolean
existsLink
(StoredObject link) Check the existence of the link under this instance for the given parameter.boolean
existsLink
(Transaction tran, int linkType, Id linkId) Check the existence of links under this instance for the given parameters.boolean
existsLink
(Transaction tran, int linkType, StoredObject link) Check the existence of links under this instance for the given parameters.boolean
existsLink
(Transaction tran, Id linkId) Check the existence of links under this instance for the given parameters.boolean
existsLink
(Transaction tran, StoredObject link) Check the existence of links under this instance for the given parameters.boolean
Check the existence of any links under this instance.boolean
existsLinks
(int linkType, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(int linkType, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(int linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran) Check the existence of links under this instance for the given parameter.boolean
existsLinks
(Transaction tran, int linkType, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, int linkType, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, int linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, String linkType, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, String linkType, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, String linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Transaction tran, String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameter.boolean
existsLinks
(Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(String linkType, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(String linkType, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(String linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.boolean
existsLinks
(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.boolean
existsMaster
(Id masterId) Check whether the given parameter is a masters of this instance or not.boolean
existsMaster
(StoredObject master) Check whether the given parameter is a masters of this instance or not.boolean
Check the existence of any masters of this instance.boolean
existsMasters
(int linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(int linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(int linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(Class<? extends StoredObject> objectClass) For the given parameter, check the existence of masters of this instance.boolean
existsMasters
(Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(String linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(String linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(String linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, check the existence of masters of this instance.boolean
existsMasters
(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, check the existence of masters of this instance.final int
family()
Get the family code of this instance.static int
Get the family code of the given Id.static <O extends StoredObject>
intGet the family code of the given class.static StoredObject
Get the instance from the database for the given Id.static <T extends StoredObject>
Tget
(ObjectIterator<T> iterator) Get the instance from the database for instances specified in an iterator.static <T extends StoredObject>
Tget
(ObjectIterator<T> list, boolean validateOne) Get the instance from the database for instances specified in an iterator.static StoredObject
get
(Transaction transaction, Id id) Get the instance from the database for the given parameters.static <T extends StoredObject>
Tget
(Transaction transaction, Class<T> objectClass, Id id) Get the instance from the database for the given parameters.static <T extends StoredObject,
C extends T>
Cget
(Transaction transaction, Class<T> objectClass, Id id, boolean any) Get the instance from the database for the given parameters.static <T extends StoredObject>
Tget
(Transaction transaction, Class<T> objectClass, String condition) Get the instance from the database for the given parameters.static <T extends StoredObject,
C extends T>
Cget
(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the instance from the database for the given parameters.static <T extends StoredObject>
Tget
(Transaction transaction, Class<T> objectClass, String condition, String order) Get the instance from the database for the given parameters.static <T extends StoredObject,
C extends T>
Cget
(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the instance from the database for the given parameters.static <T extends StoredObject>
TGet the instance from the database for the given parameter.static <T extends StoredObject,
C extends T>
CGet the instance from the database for the given parameters.static <T extends StoredObject>
TGet the instance from the database for the given parameters.static <T extends StoredObject,
C extends T>
CGet the instance from the database for the given parameters.static <T extends StoredObject>
TGet the instance from the database for the given parameters.static <T extends StoredObject,
C extends T>
CGet the instance from the database for the given parameters.static <T extends StoredObject>
TGet the instance from the database for the given parameters.static <T extends StoredObject,
C extends T>
CGet the instance from the database for the given parameters.final StreamData
getAttachment
(String name) Get the attachment available under this instance as a stream data.final Id
getAttachmentId
(String name) Get the stream data Id of the attachment available under this instance.final <T extends StoredObject>
ObjectIterator<T> Get the list of children of this class if exists.static StoredObject
getDeleted
(Id id) Get the deleted instance.static <T extends StoredObject>
TgetDeleted
(Class<T> objectClass, Id id) Get the deleted instance.static <O extends StoredObject>
StringgetExistsCondition
(Class<O> objectClass, String attributeName) Deprecated.static <O extends StoredObject>
StringgetExistsCondition
(Class<O> objectClass, String attributeName, String condition) Deprecated.final <F extends FileData>
FgetFileData
(String name) Get the "file data"FileData
attachment instance available under this instance.final <F extends FileData>
FgetFileData
(String name, Transaction transaction) Get the "file data"FileData
attachment instance available under this instance for a given transaction.static <H extends StoredObject>
HgetHistorical
(Class<H> objectClass, Id id) Retrieve an object from the database or from history if already deleted.final Id
getId()
Get the Id of this instance.protected int
getKeyIndex
(String attributeName) Get the key-index of the encryption key to be used for encrypting the given attribute value.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, int linkType, Class<T> objectClass) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, int linkType, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, int linkType, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, int linkType, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, Class<T> objectClass) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, String linkType, Class<T> objectClass) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, String linkType, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, String linkType, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TgetMaster
(Transaction transaction, String linkType, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given parameter, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.final <T extends StoredObject>
TFor the given set of parameters, look for a single master for this instance.static <O extends StoredObject>
StringgetNotExistsCondition
(Class<O> objectClass, String attributeName) Deprecated.static <O extends StoredObject>
StringgetNotExistsCondition
(Class<O> objectClass, String attributeName, String condition) Deprecated.final <T extends StoredObject>
TGet the parent of this instance if exists.final <T extends StoredObject>
TGet the specific type of parent of this instance if exists.final <T extends StoredObject>
TGet the specific type of parent of this instance if exists.final Id
Get Id of the parent of this instance if exists.final Id
getParentId
(Class<? extends StoredObject> parentClass) Get Id of the specific type of parent of this instance if exists.final Id
getParentId
(Class<? extends StoredObject> parentClass, int linkType) Get the Id of the specific type of parent of this instance if exists.final <T extends StoredObject>
TgetRelated
(Class<T> objectClass, Id id) Get the related instance from the database for the given parameters.final <T extends StoredObject>
TgetRelated
(Class<T> objectClass, Id id, boolean any) Get the related instance from the database for the given parameters.final Transaction
Get the transaction this instance is currently involved in.final Id
Current transaction Id of this instance.final String
Get the IP address from which this instance got saved to the database previously.final StoredObject
Gets an instance of the object from the database with this object's unique index condition.Gets the unique index condition of this object.final int
hashCode()
final boolean
inserted()
Is this instance just newly saved to the database?final boolean
Check if any of the attribute values of this instance is modified or not, by comparing the values with respective values available in the DB.final boolean
Check if this instance is a "virtual" instance.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, ClassAttribute<T> ca, String condition, String order, boolean any) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, ClassAttribute<T> ca, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, Class<T> objectClass, String condition) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, Class<T> objectClass, String condition, String order) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> list
(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> Get the list of instances from the database for the given parameter.static <T extends StoredObject>
ObjectIterator<T> Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> Get the list of instances from the database for the given parameters.final ObjectIterator
<? extends FileData> List all "file data"FileData
attachments available under this instance.final ObjectIterator
<? extends FileData> listFileData
(Transaction transaction) List all "file data"FileData
attachments available under this instance for a given transaction.ObjectIterator
<? extends StoredObject> List the previous versions of this object.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, int linkType, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, int linkType, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, int linkType, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, int linkType, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listLinks
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, int skip, int limit, int[] distinct) Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> Get the list of links of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(int linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(int linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(int linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(int linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(int linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, int linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, int linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, int linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, int linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, int skip, int limit, int[] distinct) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(String linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(String linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(String linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(String linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(String linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters.final <T extends StoredObject>
ObjectIterator<T> listMasters
(String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> listTree
(ObjectIterator<T> roots, Function<T, ObjectIterator<T>> childrenFunction) Get a tree under the give set of roots.static <T extends StoredObject>
ObjectIterator<T> listTree
(ObjectIterator<T> roots, Function<T, ObjectIterator<T>> childrenFunction, Predicate<T> filter) Get a tree under the give set of roots.<T extends StoredObject>
ObjectIterator<T> listTree
(Function<T, ObjectIterator<T>> childrenFunction) Get a tree under this instance.<T extends StoredObject>
ObjectIterator<T> listTree
(Function<T, ObjectIterator<T>> childrenFunction, Predicate<T> filter) Get a tree under this instance.static <T extends StoredObject>
ObjectIterator<T> listViaQuery
(Transaction transaction, Class<T> objectClass, Query query) Get the list of instances from the database for the given parameters.static <T extends StoredObject>
ObjectIterator<T> listViaQuery
(Class<T> objectClass, Query query) Get the list of instances from the database for the given parameters.static int
load
(TransactionManager tm, InputStream data, Comparator<CharSequence> objectComparator) Load data from the given input stream and create/save instanced of objects created out of that.static int
load
(TransactionManager tm, Reader data, Comparator<CharSequence> objectComparator) Load data from the given reader and create/save instanced of objects created out of that.void
load
(LineNumberReader in) Load the instance's attribute values from the given reader.final void
Load the values from a map of attribute names and its values.void
loaded()
This method is called whenever the instance is loaded from the database.final boolean
loading()
Is this instance currently getting loaded from the database?void
makeNew()
Make this instance a new instance by resetting its instance identifiers so that bothgetId()
andgetTransactionId()
returnnull
after this operation.final boolean
Make this instance a "virtual" instance.void
migrate
(TransactionManager tm, StoredObject migratedInstance) Migrate this instance to another class instance.final String
Get the module name of this instance.final StoredObject
Get next version of this object.final StoredObjectLink
<?> objectLink
(StoredObjectUtility.Link<?> sLink) Get the object link associated with this instance.final StoredObjectLink
<?> objectLink
(String name) Get the object link associated with this instance.final StoredObjectLink
<?> objectLink
(String name, boolean create) Get the object link associated with this instance.final List
<StoredObjectLink<?>> Get the list of object links associated with this instance.final List
<StoredObjectLink<?>> objectLinks
(boolean create) Get the list of object links associated with this instance.final boolean
old()
Check if the instance is old or not.person()
Get the person who created/edited this object lately.final StoredObject
Get previous version of this object.previousVersion
(StoredObject parent) Get previous version of this object not older than the parent.static Query
query
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query for the given set of parameters.static Query
query
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query for the given set of parameters.static Query
query
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query for the given set of parameters.static Query
query
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query for the given set of parameters.static Query
query
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any, int skip, int limit, int[] distinct) Build a query for the given set of parameters.static Query
query
(Class<? extends StoredObject> objectClass, String columns) Build a query for the given set of parameters.static Query
query
(Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query for the given set of parameters.static Query
query
(Class<? extends StoredObject> objectClass, String columns, String condition) Build a query for the given set of parameters.static Query
query
(Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query for the given set of parameters.static Query
Build a query for the given set of parameters.static Query
query
(Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query for the given set of parameters.final Query
queryLinks
(int linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any, int skip, int limit, int[] distinct) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, int skip, int limit, int[] distinct) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(String linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.final Query
queryLinks
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.final Query
queryMasters
(int linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any, int skip, int limit, int[] distinct) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(String linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.final Query
queryMasters
(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.final StoredObject
reload()
Reload this instance from the database.final StoredObject
reload
(Transaction fromTransaction) Reload this instance from the database for a given transaction.void
reloaded()
This method is invoked whenever this instance is reloaded from the database.final void
Remove all links.final void
removeAllLinks
(int linkType) Remove all links.final void
removeAllLinks
(Transaction transaction) Remove all links.final void
removeAllLinks
(Transaction transaction, int linkType) Remove all links.final void
removeAllLinks
(Transaction transaction, Class<? extends StoredObject> objectClass) Remove all links of a given class type.final void
removeAllLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, int linkType) Remove all links of a given class type.final void
removeAllLinks
(Transaction transaction, Class<? extends StoredObject> objectClass, String linkType) Remove all links of a given class type.final void
removeAllLinks
(Transaction transaction, String linkType) Remove all links.final void
removeAllLinks
(Class<? extends StoredObject> objectClass) Remove all links of a given class type.final void
removeAllLinks
(Class<? extends StoredObject> objectClass, int linkType) Remove all links of a given class type.final void
removeAllLinks
(Class<? extends StoredObject> objectClass, String linkType) Remove all links of a given class type.final void
removeAllLinks
(String linkType) Remove all links.final void
removeLink
(Id id) Remove the link of a given object from this instance.final void
removeLink
(Id id, int linkType) Remove the link of a given object from this instance.final void
removeLink
(Id id, String linkType) Remove the link of a given object from this instance.final void
removeLink
(StoredObject object) Remove the link of a given object from this instance.final void
removeLink
(StoredObject object, int linkType) Remove the link of a given object from this instance.final void
removeLink
(StoredObject object, String linkType) Remove the link of a given object from this instance.final void
removeLink
(Transaction transaction, Id id) Remove the link of a given object from this instance.final void
removeLink
(Transaction transaction, Id id, int linkType) Remove the link of a given object from this instance.final void
removeLink
(Transaction transaction, Id id, String linkType) Remove the link of a given object from this instance.final void
removeLink
(Transaction transaction, StoredObject object) Remove the link of a given object from this instance.final void
removeLink
(Transaction transaction, StoredObject object, int linkType) Remove the link of a given object from this instance.final void
removeLink
(Transaction transaction, StoredObject object, String linkType) Remove the link of a given object from this instance.final void
Remove all reverse links of this instance.final void
removeReverseLinks
(Transaction transaction) Remove all reverse links of this instance.final Id
save()
Save an instance to the database.final Id
save
(Transaction transaction) Save an instance to the database.final boolean
Save an instance to the database.final void
Save a stringified version of this instance to aWriter
.final void
Save this instance to a map.final void
Save this instance to a map.final void
Save this instance to a map.final void
save
(Map<String, Object> map, StringList attributes) Save this instance to a map.final void
save
(Map<String, Object> map, StringList attributes, boolean includeReferences, boolean includeClassInfo) Save this instance to a map.final void
Save this instance to a map.final void
save
(Map<String, Object> map, StringList attributes, String valueName, boolean includeReferences, boolean includeClassInfo) Save this instance to a map.final void
Save this instance to a map.final void
Save this instance to a map.final void
Save this instance to a map.void
saved()
This method is invoked whenever an instance is saved/deleted/resurrected.final boolean
saving()
Is this instance currently being saved to the database?void
setMaster
(StoredObject master, int linkType) Set the master.void
setRawValue
(String attributeName, Object rawValue) Set a raw value to the given attribute.void
setTransaction
(Transaction transaction) Set transaction for saving the instance to the database.final String
Create a stringified version of this instance.final String
Get the table name of this instance in the database.final Timestamp
Get the timestamp of this entry.static String
Convert a string to a code.Display representation of the instance used for human-friendly display.toString()
String representation of the instance.final boolean
Is this instance is part of a transaction now?final void
undelete()
Resurrect an old instance in the database.final void
undelete
(Transaction transaction) Resurrect an old instance in the database.final boolean
Can this instance be undeleted now (it's currently deleted in the database)?final boolean
updated()
Is this instance updated a new version in the database?user()
Get the system user who created/edited this object lately.final Id
userId()
Get the Id of the user who created/edited this object lately.void
validate()
This method is invoked internally by the system whenever the object gets saved to the DB (that means, while doing transactions).void
validateChildAttach
(StoredObject child, int linkType) Do validation when a child is attached.void
validateChildDetach
(StoredObject child, int linkType) Do validation when a child is detached.void
validateChildUpdate
(StoredObject child, int linkType) Do validation when a child is updated.void
This will be invoked by the system whenever the object is saved to the DB.void
This method will be invoked whenever an existing instance is deleted from the database.void
This method will be invoked whenever a new instance is saved to the database.void
validateParentAttach
(StoredObject parent, int linkType) Do validation when this gets attached to a parent object.void
validateParentDetach
(StoredObject parent, int linkType) Do validation when this gets detached from a parent object.void
validateParentUpdate
(StoredObject parent, int linkType) Validate the parent when it is updated.void
This method will be invoked whenever an old instance is resurrected in the database.void
This method will be invoked whenever an existing instance is updated in the database.final boolean
valueEquals
(StoredObject another) Check if the attribute values of this instance is exactly same as the values of another instance.
-
Field Details
-
logger
-
-
Constructor Details
-
StoredObject
public StoredObject()Constructor.
-
-
Method Details
-
getId
-
getTransactionId
Current transaction Id of this instance. An instance receives a transaction Id whenever it gets saved to the database.- Returns:
- Transaction Id.
-
makeNew
public void makeNew()Make this instance a new instance by resetting its instance identifiers so that bothgetId()
andgetTransactionId()
returnnull
after this operation. Once done, it can be saved like any newly created object but all attribute values remains intact from the previous instance. The instance must not be participating any active transaction, otherwise, aSORuntimeException
is raised. -
isVirtual
public final boolean isVirtual()Check if this instance is a "virtual" instance. (Virtual instances can not be saved to the DB).- Returns:
- True if virtual.
-
makeVirtual
public final boolean makeVirtual()Make this instance a "virtual" instance. (Virtual instances can not be saved to the DB).- Returns:
- True if turned into virtual now or was already virtual.
-
isModified
public final boolean isModified()Check if any of the attribute values of this instance is modified or not, by comparing the values with respective values available in the DB. For newly created instances, it always returnstrue
.Note: A virtual instance will become a new instance (with all the attribute values intact - equivalent of invoking
makeNew()
) if this method is invoked, and it will always returntrue
.- Returns:
- True/false
-
getTransactionIP
Get the IP address from which this instance got saved to the database previously.- Returns:
- IP address. It may return "N/A" if the information is not available.
-
setTransaction
Set transaction for saving the instance to the database.- Parameters:
transaction
- Transaction.- Throws:
Exception
- If the current state doesn't allow a transaction. (It may be already in some transaction, or it could be a MasterObject instance).
-
getTransaction
Get the transaction this instance is currently involved in.- Returns:
- Transaction. Could be null.
-
getKeyIndex
Get the key-index of the encryption key to be used for encrypting the given attribute value.- Parameters:
attributeName
- Attribute name whose value needs to be encrypted. Note: Only text values can be encrypted.- Returns:
- Key-index.
-
equals
-
valueEquals
Check if the attribute values of this instance is exactly same as the values of another instance.- Parameters:
another
- Another instance.- Returns:
- True if the attribute values are same.
-
hashCode
-
old
public final boolean old()Check if the instance is old or not. An instance is old only if newer versions of it are already saved to the database.- Returns:
- True/false.
-
created
public final boolean created()Is this instance just created?- Returns:
- True/false.
-
inserted
public final boolean inserted()Is this instance just newly saved to the database?- Returns:
- True/false.
-
updated
public final boolean updated()Is this instance updated a new version in the database?- Returns:
- True/false.
-
deleted
public final boolean deleted()Is this instance deleted in the database?- Returns:
- True/false.
-
undeleted
public final boolean undeleted()Can this instance be undeleted now (it's currently deleted in the database)?- Returns:
- True/false.
-
transacting
public final boolean transacting()Is this instance is part of a transaction now?- Returns:
- True/false.
-
loading
public final boolean loading()Is this instance currently getting loaded from the database?- Returns:
- True/false.
-
saving
public final boolean saving()Is this instance currently being saved to the database?- Returns:
- True/false.
-
moduleName
Get the module name of this instance. Every instance has a module name, and it is the last part of its package name.- Returns:
- Module name.
-
tableName
Get the table name of this instance in the database. By default, the class name's last part is the table name, but it doesn't have to be like that.- Returns:
- Table name.
-
family
public final int family()Get the family code of this instance. Every class derived fromStoredObject
has a unique family code.- Returns:
- Family code.
-
family
Get the family code of the given class. Every class derived fromStoredObject
has a unique family code.- Type Parameters:
O
- Type of object class.- Parameters:
objectClass
- Class for which family code is required.- Returns:
- Family code.
-
family
Get the family code of the given Id. Every class derived fromStoredObject
has a unique family code.- Parameters:
id
- Id for which family code is required.- Returns:
- Family code.
-
checkTransaction
-
validateInsert
This method will be invoked whenever a new instance is saved to the database. So, it will be called within an active transaction. Child classes can override this method to do validation when a newly created instance is saved to the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
validate()
.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateUpdate
This method will be invoked whenever an existing instance is updated in the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an existing instance is updated in the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
validate()
.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateDelete
This method will be invoked whenever an existing instance is deleted from the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an existing instance is deleted from the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
validate()
.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateUndelete
This method will be invoked whenever an old instance is resurrected in the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an old instance is made live again in the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
validate()
.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validate
This method is invoked internally by the system whenever the object gets saved to the DB (that means, while doing transactions). It will be invoked in all cases (while creating new objects and updating/deleting/un-deleting existing objects). If this method raises any exceptions, the process of saving to the DB will be abandoned.
This method is not usually used for validating data (For that purpose,
validateData(TransactionManager)
is recommended). It is mainly used for validating state of the object. Methods such ascreated()
,updated()
,deleted()
,undeleted()
etc. are used to check the specific states but overridden methods may check for other "application-specific"/"business-specific" states.This method is invoked only after one of the other operation-specific validate method is invoked depending on the save operation -
validateInsert()
,validateUpdate()
,validateDelete()
,validateUndelete()
.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateChildAttach
Do validation when a child is attached.Note: This method will be invoked only if this class implements
HasChildren
.- Parameters:
child
- Child to validate.linkType
- Link type.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateChildDetach
Do validation when a child is detached.Note: This method will be invoked only if this class implements
HasChildren
.- Parameters:
child
- Child to validate.linkType
- Link type.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateChildUpdate
Do validation when a child is updated. Default implementation of this invokesvalidateChildAttach(StoredObject, int)
.Note: This method will be invoked only if this class implements
HasChildren
.- Parameters:
child
- Child to validate.linkType
- Link type.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateParentAttach
Do validation when this gets attached to a parent object.Note: This method will be invoked only if this class implements
HasParents
.- Parameters:
parent
- Parent to validate.linkType
- Link type.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateParentDetach
Do validation when this gets detached from a parent object.Note: This method will be invoked only if this class implements
HasParents
.- Parameters:
parent
- Parent to validate.linkType
- Link type.- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateParentUpdate
Validate the parent when it is updated. Default implementation of this invokesvalidateParentAttach(StoredObject, int)
.Note: This method will be invoked only if this class implements
HasParents
.- Parameters:
parent
- Parent to validate.linkType
- Link type.- Throws:
Exception
- Exception.
-
delete
Delete this instance from the database. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateDelete()
,validate()
.- Parameters:
transaction
- Transaction.- Throws:
Exception
- If the operation is not successful.
-
delete
Delete this instance from the database. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateDelete()
,validate()
.Note: Transaction must have been set via
setTransaction(Transaction)
before invoking this method.- Throws:
Exception
- If the operation is not successful.
-
undelete
Resurrect an old instance in the database. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateUndelete()
,validate()
.- Parameters:
transaction
- Transaction.- Throws:
Exception
- If the operation is not successful.
-
undelete
Resurrect an old instance in the database. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateUndelete()
,validate()
.Note: Transaction must have been set via
setTransaction(Transaction)
before invoking this method.- Throws:
Exception
- If the operation is not successful.
-
save
Save an instance to the database. It could be a new instance or an existing instance. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateInsert()
/validateUpdate()
,validate()
.- Parameters:
transaction
- Transaction.- Returns:
- Id Id of the save instance.
- Throws:
Exception
- If the operation is not successful.
-
save
Save an instance to the database. It could be a new instance or an existing instance (it could be in the deleted state too in the database). The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateInsert()
/validateUpdate()
/validateUndelete()
,validate()
.Note: Transaction must have been set via
setTransaction(Transaction)
before invoking this method.- Returns:
- Id Id of the save instance.
- Throws:
Exception
- If the operation is not successful.
-
save
Save an instance to the database. It could be a new instance or an existing instance. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateInsert()
/validateUpdate()
,validate()
.- Parameters:
tc
- Transaction control.- Returns:
- True if save is successful, otherwise, false.
-
delete
Delete an instance in the database. The following methods are invoked in that order before carrying out this operation and if any of them throws any exception, the operation is abandoned -validateData(TransactionManager)
,validateDelete()
,validate()
.- Parameters:
tc
- Transaction control.- Returns:
- True if save is successful, otherwise, false.
-
validateData
This will be invoked by the system whenever the object is saved to the DB. It will be invoked in all cases, while creating new objects and updating/deleting/un-deleting existing objects. If any exception is raised by this method, the process of saving to the DB will be abandoned.
Note: This method is mainly used to validate the data of all attributes of the object, and it may be used by others for validating the object. For example, front-end data-entry systems can use this method for validating the object.
- Parameters:
tm
- Current transaction manager.- Throws:
Exception
- If data is invalid.
-
saved
This method is invoked whenever an instance is saved/deleted/resurrected. It can be overridden to take care of any additional actions required by the application.- Throws:
Exception
- When error occurs or invalidate state exists so that transaction will be abandoned.
-
directUpdate
Do direct update without creating a transaction. If the instance is not yet in the database, a new entry is created in the database via a transaction.Note: Direct update works only on special type of objects and currently, it is not available to end-developers.
- Parameters:
tm
- Currently valid transaction manager.- Throws:
Exception
- If any error occurs.
-
stringify
Create a stringified version of this instance.- Returns:
- A stringified version of this instance. Such a string can be used to reconstruct the instance using
load(LineNumberReader)
. - Throws:
Exception
- If any exception during the stringification process.
-
save
-
save
-
save
Save this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.includeReferences
- Whether to include details of the references or not.- Throws:
Throwable
- If any exception during the map writing process.
-
save
public final void save(Map<String, Object> map, boolean includeReferences, boolean includeClassInfo) throws ThrowableSave this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.includeReferences
- Whether to include details of the references or not.includeClassInfo
- Whether to include class information or not.- Throws:
Throwable
- If any exception during the map writing process.
-
save
public final void save(Map<String, Object> map, StringList attributes, boolean includeReferences, boolean includeClassInfo) throws ThrowableSave this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.attributes
- Attributes to be added.includeReferences
- Whether to include details of the references or not.includeClassInfo
- Whether to include class information or not.- Throws:
Throwable
- If any exception during the map writing process.
-
save
public final void save(Map<String, Object> map, String valueName, boolean includeReferences, boolean includeClassInfo) throws ThrowableSave this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.valueName
- If this is specified (means, if non-null), the object is added to the map with this as the key.includeReferences
- Whether to include details of the references or not.includeClassInfo
- Whether to include class information or not.- Throws:
Throwable
- If any exception during the map writing process.
-
save
public final void save(Map<String, Object> map, String valueName, boolean includeReferences) throws ThrowableSave this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.valueName
- If this is specified (means, if non-null), the object is added to the map with this as the key.includeReferences
- Whether to include details of the references or not.- Throws:
Throwable
- If any exception during the map writing process.
-
save
public final void save(Map<String, Object> map, StringList attributes, String valueName) throws ThrowableSave this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.attributes
- Attributes to be added.valueName
- If this is specified (means, if non-null), the object is added to the map with this as the key.- Throws:
Throwable
- If any exception during the map writing process.
-
save
Save this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.attributes
- Attributes to be added.- Throws:
Throwable
- If any exception during the map writing process.
-
save
Save this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.valueName
- If this is specified (means, if non-null), the object is added to the map with this as the key.- Throws:
Throwable
- If any exception during the map writing process.
-
save
public final void save(Map<String, Object> map, StringList attributes, String valueName, boolean includeReferences, boolean includeClassInfo) throws ThrowableSave this instance to a map. The map will contain an entry for each of the attributes.- Parameters:
map
- Map to which instance to be saved.attributes
- Attributes to be added.valueName
- If this is specified (means, if non-null), the object is added to the map with this as the key.includeReferences
- Whether to include details of the references or not.includeClassInfo
- Whether to include information about the class or not.- Throws:
Throwable
- If any exception during the map writing process.
-
copy
Copy the given object instance to this instance.- Parameters:
another
- Object instance to copy from.- Returns:
- If the copying is done. (If both contains same details, it will not be copied).
- Throws:
Exception
- If any error occurs while copying.
-
copy
Return a copy of this instance.- Returns:
- Copy of the same instance.
- Throws:
Exception
- If any error occurs while copying.
-
setRawValue
Set a raw value to the given attribute. It will do the best effort to convert the given value to the attribute's type.- Parameters:
attributeName
- Attribute name.rawValue
- Value to set.- Throws:
Exception
- If any error occurs because the there is no way that the value passed can be converted.
-
load
Load the values from a map of attribute names and its values. The map may contain extra attributes than are not matching with any attributes of this class and those values will be ignored.- Parameters:
map
- Map.- Throws:
Exception
- If any error occurs because the map contains incompatible values.
-
load
Load the instance's attribute values from the given reader. (Typically, values saved viasave(Writer)
can be read back through this method).- Parameters:
in
- Reader from which values are read.- Throws:
Exception
- If any error occurs because input contains errors or values that are not matching.
-
create
Create an instance from the given reader. (Typically, values saved viasave(Writer)
can be used here).- Parameters:
in
- Reader from which values are read.- Returns:
- Instance created.
- Throws:
Exception
- If any error occurs because input contains errors or values that are not matching.
-
load
public static int load(TransactionManager tm, InputStream data, Comparator<CharSequence> objectComparator) throws Exception Load data from the given input stream and create/save instanced of objects created out of that. (Typically, values saved viasave(Writer)
are compatible for this operation).- Parameters:
tm
- Transaction manager (required for creating transactions).data
- Stream from which values are read.objectComparator
- A comparator that will be used to compare values with the created ones to eliminate duplication.- Returns:
- Number of objects added.
- Throws:
Exception
- If any error occurs because input contains errors or values that are not matching.
-
load
public static int load(TransactionManager tm, Reader data, Comparator<CharSequence> objectComparator) throws Exception Load data from the given reader and create/save instanced of objects created out of that. (Typically, values saved viasave(Writer)
are compatible for this operation).- Parameters:
tm
- Transaction manager (required for creating transactions).data
- Reader from which values are read.objectComparator
- A comparator that will be used to compare values with the created ones to eliminate duplication.- Returns:
- Number of objects added.
- Throws:
Exception
- If any error occurs because input contains errors or values that are not matching.
-
getUniqueCondition
Gets the unique index condition of this object.- Returns:
- Unique index condition.
-
getUnique
Gets an instance of the object from the database with this object's unique index condition.- Returns:
- Instance of the unique object or null if no such instance exists.
-
checkForDuplicate
public final boolean checkForDuplicate()Checks if a duplicate entry exists in the database or not.- Returns:
- true if no duplicate entry exists.
-
checkForDuplicate
Checks if a duplicate entry exists in the database or not.- Parameters:
attributes
- Attributes for which value should be unique.- Throws:
Invalid_State
- if duplicate entry exists or if any of the attribute doesn't belong to this class.
-
migrate
Migrate this instance to another class instance. Please note that there is no error checking or validations when this is invoked. This is used very rarely, and it may be useful for building low-level utilities.- Parameters:
tm
- Transaction Manager.migratedInstance
- Migrated instance. Make sure that all the attribute values are properly set.- Throws:
Exception
- thrown for errors.
-
loaded
public void loaded()This method is called whenever the instance is loaded from the database. Any additional logic can be here for extended classes. -
addLink
Add a given object as a link to this instance. (Transaction must have been already set on this object). It will be added with default link type = 0.- Parameters:
object
- Object to add.- Throws:
Exception
- If any error occurs.
-
addLink
Add a given object as a link to this instance. (Transaction must have been already set on this object).- Parameters:
object
- Object to add.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
addLink
Add a given object as a link to this instance. It will be added with default link type = 0.- Parameters:
transaction
- Transaction.object
- Object to add.- Throws:
Exception
- If any error occurs.
-
addLink
public final void addLink(Transaction transaction, StoredObject object, int linkType) throws Exception Add a given object as a link to this instance.- Parameters:
transaction
- Transaction.object
- Object to add.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
addLink
-
addLink
-
addLink
Add a given Id as a link to this instance. It will be added with default link type = 0.- Parameters:
transaction
- Transaction.id
- Id to add.- Throws:
Exception
- If any error occurs.
-
addLink
Add a given Id as a link to this instance.- Parameters:
transaction
- Transaction.id
- Id to add.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeLink
Remove the link of a given object from this instance. (Transaction must have been already set on this object).- Parameters:
object
- Object to remove.- Throws:
Exception
- If any error occurs.
-
removeLink
Remove the link of a given object from this instance.- Parameters:
transaction
- Transaction.object
- Object to remove.- Throws:
Exception
- If any error occurs.
-
removeLink
-
removeLink
Remove the link of a given object from this instance.- Parameters:
transaction
- Transaction.id
- Id of the object to remove.- Throws:
Exception
- If any error occurs.
-
removeLink
Remove the link of a given object from this instance. (Transaction must have been already set on this object).- Parameters:
object
- Object to remove.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeLink
public final void removeLink(Transaction transaction, StoredObject object, int linkType) throws Exception Remove the link of a given object from this instance.- Parameters:
transaction
- Transaction.object
- Object to remove.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeLink
-
removeLink
Remove the link of a given object from this instance.- Parameters:
transaction
- Transaction.id
- Id of the object to remove.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeLink
Remove the link of a given object from this instance. (Transaction must have been already set on this object).- Parameters:
object
- Object to remove.linkType
- Types of the link to access (as a condition).- Throws:
Exception
- If any error occurs.
-
removeLink
public final void removeLink(Transaction transaction, StoredObject object, String linkType) throws Exception Remove the link of a given object from this instance.- Parameters:
transaction
- Transaction.object
- Object to remove.linkType
- Types of the link to access (as a condition).- Throws:
Exception
- If any error occurs.
-
removeLink
Remove the link of a given object from this instance. (Transaction must have been already set on this object).- Parameters:
id
- Id of the object to remove.linkType
- Types of the link is given as a condition.- Throws:
Exception
- If any error occurs.
-
removeLink
Remove the link of a given object from this instance.- Parameters:
transaction
- Transaction.id
- Id of the object to remove.linkType
- Types of the link is given as a condition.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
-
removeAllLinks
Remove all links.- Parameters:
transaction
- Transaction.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
-
removeAllLinks
Remove all links.- Parameters:
transaction
- Transaction.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
-
removeAllLinks
Remove all links.- Parameters:
transaction
- Transaction.linkType
- Types of the link is given as a condition.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
Remove all links of a given class type. (Transaction must have been already set on this object).- Parameters:
objectClass
- Class type.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
public final void removeAllLinks(Transaction transaction, Class<? extends StoredObject> objectClass) throws Exception Remove all links of a given class type.- Parameters:
transaction
- Transaction.objectClass
- Class type.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
public final void removeAllLinks(Class<? extends StoredObject> objectClass, int linkType) throws Exception Remove all links of a given class type. (Transaction must have been already set on this object).- Parameters:
objectClass
- Class type.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
public final void removeAllLinks(Transaction transaction, Class<? extends StoredObject> objectClass, int linkType) throws Exception Remove all links of a given class type.- Parameters:
transaction
- Transaction.objectClass
- Class type.linkType
- Type of the link.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
public final void removeAllLinks(Class<? extends StoredObject> objectClass, String linkType) throws Exception Remove all links of a given class type. (Transaction must have been already set on this object).- Parameters:
objectClass
- Class type.linkType
- Types of the link is given as a condition.- Throws:
Exception
- If any error occurs.
-
removeAllLinks
public final void removeAllLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String linkType) throws Exception Remove all links of a given class type.- Parameters:
transaction
- Transaction.objectClass
- Class type.linkType
- Types of the link is given as a condition.- Throws:
Exception
- If any error occurs.
-
removeReverseLinks
-
removeReverseLinks
Remove all reverse links of this instance.- Parameters:
transaction
- Transaction.- Throws:
Exception
- If any error occurs.
-
checkTimeZone
Validate the time zone passed.- Parameters:
timeZone
- Time zone to check.- Returns:
- Zone Id
ZoneId
. - Throws:
Invalid_Value
- If the time zone is invalid.
-
checkCurrency
Validate the currency code passed.- Parameters:
currencyCode
- Currency code to check.- Returns:
- Validated currency code (converted to upper case).
- Throws:
Invalid_Value
- If the code is invalid.
-
checkCurrency
Validate the currency code passed.- Parameters:
currencyCode
- Currency code to check.includeMetals
- Whether to include precious metals ot not.- Returns:
- Validated currency code (converted to upper case).
- Throws:
Invalid_Value
- If the code is invalid.
-
getParent
Get the parent of this instance if exists. (A parent can exist only if links of the same type are defined).- Type Parameters:
T
- Type of the parent expected. (Same as this class).- Returns:
- Parent instance if exists, otherwise null.
-
getParentId
Get Id of the parent of this instance if exists. (A parent can exist only if links of the same type are defined).- Returns:
- Id of the parent instance if exists, otherwise null.
-
getParent
Get the specific type of parent of this instance if exists.- Type Parameters:
T
- Type of the parent expected.- Parameters:
parentClass
- Parent class.- Returns:
- Parent instance if exists, otherwise null.
-
getParentId
Get Id of the specific type of parent of this instance if exists.- Parameters:
parentClass
- Parent class.- Returns:
- Id of the parent instance if exists, otherwise null.
-
getParent
Get the specific type of parent of this instance if exists.- Type Parameters:
T
- Type of the parent expected.- Parameters:
parentClass
- Parent class.linkType
- Type of link.- Returns:
- Parent instance if exists, otherwise null.
-
getParentId
Get the Id of the specific type of parent of this instance if exists.- Parameters:
parentClass
- Parent class.linkType
- Type of link.- Returns:
- Id of the parent instance if exists, otherwise null.
-
getChildren
Get the list of children of this class if exists. (Children may exist only if links of the same class type is defined).- Type Parameters:
T
- Child type. Same as this class type.- Returns:
- List as an object iterator.
-
reload
Reload this instance from the database.- Returns:
- The reloaded instance. The same instance will be returned unless an error occurs and in that case null is returned.
-
reload
Reload this instance from the database for a given transaction.- Parameters:
fromTransaction
- Transaction for which the instance should be loaded.- Returns:
- The reloaded instance. The same instance will be returned unless an error occurs and in that case null is returned.
-
reloaded
public void reloaded()This method is invoked whenever this instance is reloaded from the database. -
toString
-
toDisplay
Display representation of the instance used for human-friendly display.- Specified by:
toDisplay
in interfaceDisplayable
- Returns:
- Display representation of the instance.
-
timestamp
Get the timestamp of this entry.- Returns:
- Timestamp. Returns null if the object was never saved to the
database or if it is a
MasterObject
.
-
userId
Get the Id of the user who created/edited this object lately.- Returns:
- Id. Returns null if the object was never saved to the database or if it is a
MasterObject
.
-
user
Get the system user who created/edited this object lately.- Returns:
- Returns null if the object was never saved to the database or if it is a
MasterObject
.
-
getHistorical
Retrieve an object from the database or from history if already deleted.- Type Parameters:
H
- Type of object class- Parameters:
objectClass
- Class of the objectid
- Id of the object- Returns:
- Object if available, otherwise null.
-
person
Get the person who created/edited this object lately.- Returns:
- Returns null if the object was never saved to the database or if it is a
MasterObject
.
-
get
Get the instance from the database for the given Id.- Parameters:
id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved or null if it is not available for the given parameter.
-
get
Get the instance from the database for the given parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
Get the instance from the database for the given parameters.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
getDeleted
Get the deleted instance. (If the instance was not deleted, null is returned).- Parameters:
id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved.
-
getDeleted
Get the deleted instance. (If the instance was not deleted, null is returned).- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved.
-
getRelated
Get the related instance from the database for the given parameters. If this instance is an old instance, then, the retrieved instance could be old. However, if this instance is the latest version, this method works exactly likeget(Transaction, Class, Id)
.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
previousVersion
Get previous version of this object. It could be null.- Returns:
- The version of this object saved last.
-
nextVersion
Get next version of this object. It will be null if this itself is the current version.- Returns:
- The version of the object saved after this version.
-
getRelated
Get the related instance from the database for the given parameters. If this instance is an old instance, then, the retrieved instance also could be old. However, if this instance is the latest version, this method works exactly likeget(Transaction, Class, Id)
.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
Get the instance from the database for the given parameters.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
Get the instance from the database for the given parameter. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.- Returns:
- The instance retrieved or null if it is not available for the given parameter.
-
get
Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject> T get(Transaction transaction, Class<T> objectClass, String condition) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject> T get(Transaction transaction, Class<T> objectClass, String condition, String order) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
Get the instance from the database for instances specified in an iterator. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.- Parameters:
iterator
- Iterator.- Returns:
- The instance retrieved or null if it is not available for the given parameter.
-
get
Get the instance from the database for instances specified in an iterator. If no instance is found, null is returned. If multiple instances exist, only one will be retrieved based on the second parameter.- Type Parameters:
T
- type of object class.- Parameters:
list
- Iterator.validateOne
- If true and multiple instances are found, null will be returned. Otherwise, one entry is returned.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
listHistory
List the previous versions of this object.- Returns:
- Iterator of the previous versions.
-
contemporary
Get the contemporary version of this instance with respect to another object instance.- Parameters:
other
- The other object.- Returns:
- The contemporary version. Null is returned if this instance was created after the creation of the "other".
-
previousVersion
Get previous version of this object not older than the parent. It could be null.- Parameters:
parent
- Parent object to compare the age.- Returns:
- The version of this object saved last.
-
get
Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject,C extends T> C get(Transaction transaction, Class<T> objectClass, Id id, boolean any) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.id
- Id of the instance needs to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
objectClass
- Type of instance to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject,C extends T> C get(Class<T> objectClass, String condition, boolean any) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject,C extends T> C get(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject,C extends T> C get(Class<T> objectClass, String condition, String order, boolean any) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
get
public static <T extends StoredObject,C extends T> C get(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the instance from the database for the given parameters. Multiple instances may exist and in that case, only one will be retrieved.- Type Parameters:
T
- type of object class.C
- type of object class retrieved.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instance retrieved or null if it is not available for the given parameters.
-
listViaQuery
public static <T extends StoredObject> ObjectIterator<T> listViaQuery(Class<T> objectClass, Query query) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.query
- Query containing the column value for the Id of the object.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
listViaQuery
public static <T extends StoredObject> ObjectIterator<T> listViaQuery(Transaction transaction, Class<T> objectClass, Query query) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.query
- Query containing a single column value for Id of the object.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
Get the list of instances from the database for the given parameter. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.- Returns:
- The instances retrieved for the given parameter as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String condition) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, Class<T> objectClass, String condition) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String condition, String order) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, Class<T> objectClass, String condition, String order) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String condition, boolean any) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String condition, String order, boolean any) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Array of column indices for determining distinct values.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, ClassAttribute<T> ca, String condition, String order, boolean any) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.ca
- Class attribute of the type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
list
public static <T extends StoredObject> ObjectIterator<T> list(Transaction transaction, ClassAttribute<T> ca, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of instances from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.ca
- Class attribute of the type of instance to be retrieved.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- The instances retrieved for the given parameters as an iterator.
-
listTree
public <T extends StoredObject> ObjectIterator<T> listTree(Function<T, ObjectIterator<T>> childrenFunction) Get a tree under this instance. This instance (the root) will not be returned.Note: This instance should be of type T.
- Type Parameters:
T
- Type of objects to be returned.- Parameters:
childrenFunction
- Function determining how the children are retrieved. This instance is passed to this function to obtain the list of children and then, it will be recursively applied for getting the grand-children for each child.- Returns:
- Iterator for tree traversal.
-
listTree
public <T extends StoredObject> ObjectIterator<T> listTree(Function<T, ObjectIterator<T>> childrenFunction, Predicate<T> filter) Get a tree under this instance.This instance (the root) will not be returned. If you want to return the root also, you may use
listTree(ObjectIterator, Function, Predicate)
where you can pass ObjectIterator.create(this) as the first parameter.Note: This instance should be of type T.
- Type Parameters:
T
- Type of objects to be returned.- Parameters:
childrenFunction
- Function determining how the children are retrieved. This instance is passed to this function to obtain the list of children and then, it will be recursively applied for getting the grand-children for each child.filter
- Filter to be applied on children.- Returns:
- Iterator for tree traversal.
-
listTree
public static <T extends StoredObject> ObjectIterator<T> listTree(ObjectIterator<T> roots, Function<T, ObjectIterator<T>> childrenFunction) Get a tree under the give set of roots. This instance (the root) will not be returned.- Type Parameters:
T
- Type of objects to be returned.- Parameters:
roots
- List of roots under which children need to be retrieved. Roots are also returned.childrenFunction
- Function determining how the children are retrieved. This instance is passed to this function to obtain the list of children and then, it will be recursively applied for getting the grand-children for each child.- Returns:
- Iterator for tree traversal.
-
listTree
public static <T extends StoredObject> ObjectIterator<T> listTree(ObjectIterator<T> roots, Function<T, ObjectIterator<T>> childrenFunction, Predicate<T> filter) Get a tree under the give set of roots. This instance (the root) will not be returned.- Type Parameters:
T
- Type of objects to be returned.- Parameters:
roots
- List of roots under which children need to be retrieved. Roots are also returned.childrenFunction
- Function determining how the children are retrieved. This instance is passed to this function to obtain the list of children and then, it will be recursively applied for getting the grand-children for each child.filter
- Filter to be applied on children.- Returns:
- Iterator for tree traversal.
-
exists
Check the existence of any instances for the given set of parameters.- Parameters:
query
- Query that contains the necessary conditions to test.- Returns:
- True if any instances exist, otherwise false.
-
exists
Check the existence of any instances for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True if any instances exist. Otherwise, false.
-
exists
public static boolean exists(Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of any instances for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if any instances exist. Otherwise, false.
-
exists
public static boolean exists(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) Check the existence of any instances for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True if any instances exist, otherwise false.
-
exists
public static boolean exists(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of any instances for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if any instances exist, otherwise false.
-
query
Build a query for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Class<? extends StoredObject> objectClass, String columns, String condition) Build a query for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the output.
-
query
Build a query for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the output.
-
query
public static Query query(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any, int skip, int limit, int[] distinct) Build a query for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- Query that can be used to obtain values of the output.
-
count
Count the number of instances for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- Count.
-
count
Count the number of instances for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
count
public static int count(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) Count the number of instances for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
count
Count the number of instances for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
count
Count the number of instances for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
count
public static int count(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the number of instances for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
listLinks
Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(int linkType, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, int linkType, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(int linkType, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, int linkType, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(int linkType, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(String linkType, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(String linkType, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, String condition) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(String linkType, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, int skip, int limit, int[] distinct) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(int linkType, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, int linkType, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(int linkType, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, int linkType, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(String linkType, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(String linkType, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, String condition, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
listLinks
public final <T extends StoredObject> ObjectIterator<T> listLinks(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of links of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- The instances of links retrieved for the given parameters as an iterator.
-
existsLink
Check the existence of the link under this instance for the given parameter.- Parameters:
link
- Link to check.- Returns:
- True or false.
-
existsLink
Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Types of link to be retrieved.link
- Link to check.- Returns:
- True or false.
-
existsLink
Check the existence of the link under this instance for the given parameter.- Parameters:
linkId
- Link Id to check.- Returns:
- True or false.
-
existsLink
Check the existence of the link under this instance for the given parameters.- Parameters:
linkType
- Types of link to be retrieved.linkId
- Link Id to check.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks()Check the existence of any links under this instance.- Returns:
- True or false.
-
existsLink
Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.link
- Link to check.- Returns:
- True or false.
-
existsLink
Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved.link
- Link to check.- Returns:
- True or false.
-
existsLink
Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkId
- Link Id to check.- Returns:
- True or false.
-
existsLink
Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved.linkId
- Link Id to check.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameter.- Parameters:
tran
- Transaction for which the retrieval needs to be done.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameter.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(String linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Types of link to be retrieved. as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(int linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, String linkType, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, String linkType, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, String linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Types of link to be retrieved as a condition.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, int linkType, Class<? extends StoredObject> objectClass) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, int linkType, Class<? extends StoredObject> objectClass, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, int linkType, Class<? extends StoredObject> objectClass, String condition) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True or false.
-
existsLinks
public boolean existsLinks(Transaction tran, int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Check the existence of links under this instance for the given parameters.- Parameters:
tran
- Transaction for which the retrieval needs to be done.linkType
- Type of link to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True or false.
-
queryLinks
Build a query to access the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(int linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(String linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, int skip, int limit, int[] distinct) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link to access as a condition.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the links.
-
queryLinks
public final Query queryLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any, int skip, int limit, int[] distinct) Build a query to access the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names od the links) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Array of column indices for determining distinct values.- Returns:
- Query that can be used to obtain values of the links.
-
countLinks
Count the links of this instance for the given parameter.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countLinks
Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countLinks
Count the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countLinks
Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countLinks
public final int countLinks(int linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countLinks
Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countLinks
public final int countLinks(String linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countLinks
Count the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Type of the link to access.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to access.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(String linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countLinks
public final int countLinks(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) Count the links of this instance for the given set of parameters.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to access (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
listMasters
Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(int linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, int linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(int linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, int linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(int linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(String linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(String linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, String condition) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(String linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, int skip, int limit, int[] distinct) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Array of column indices for determining distinct values.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(int linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, int linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(int linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, int linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, int linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of link for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(String linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(String linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, String condition, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
listMasters
public final <T extends StoredObject> ObjectIterator<T> listMasters(Transaction transaction, String linkType, Class<T> objectClass, String condition, String order, boolean any, int skip, int limit, int[] distinct) Get the list of masters of this instance from the database for the given parameters. The list will be returned as an iterator, and it needs to be closed by the developer if all the instances are not used from the iterator.- Type Parameters:
T
- Type of object class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of link as a condition for which masters to be retrieved.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.order
- Order as comma separated attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- The instances of masters retrieved for the given parameters as an iterator.
-
setMaster
Set the master. This is typically invoked by UI so that validation can be done. When this class is implementingDetail
and if it is required to set the master as an attribute, this method can save the master'sId
when this method is invoked.This method is also invoked just before a
Detail
link is saved/deleted via theStoredObjectLink
. (Note: In most situations,StoredObjectLink
instance does the saving/deleting ofDetail
instances unless programmatically handled that in specific code).- Parameters:
master
- Master object.linkType
- Type of the link for this master.- Throws:
Exception
- Error may be thrown in case of invalid states.
-
getMaster
For the given parameter, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, int linkType, Class<T> objectClass) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(int linkType, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, int linkType, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, String linkType, Class<T> objectClass) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(String linkType, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, String linkType, Class<T> objectClass, String condition) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, int linkType, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(int linkType, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, int linkType, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(String linkType, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, String linkType, Class<T> objectClass, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(String linkType, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
getMaster
public final <T extends StoredObject> T getMaster(Transaction transaction, String linkType, Class<T> objectClass, String condition, boolean any) For the given set of parameters, look for a single master for this instance.- Type Parameters:
T
- Type of master class.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- The single master instance if it exists, otherwise, null.
-
existsMaster
Check whether the given parameter is a masters of this instance or not.- Parameters:
master
- Master to check.- Returns:
- True if exists, otherwise false.
-
existsMaster
Check whether the given parameter is a masters of this instance or not.- Parameters:
masterId
- Id of the master.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters()Check the existence of any masters of this instance.- Returns:
- True if exists, otherwise false.
-
existsMasters
For the given parameter, check the existence of masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- True if exists, otherwise false.
-
existsMasters
For the given set of parameters, check the existence of masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if exists, otherwise false.
-
existsMasters
For the given set of parameters, check the existence of masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters(Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, check the existence of masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if exists, otherwise false.
-
existsMasters
For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters(String linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters(String linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if exists, otherwise false.
-
existsMasters
For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.- Returns:
- True if exists, otherwise false.
-
existsMasters
For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters(int linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- True if exists, otherwise false.
-
existsMasters
public boolean existsMasters(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, check the existence of masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- True if exists, otherwise false.
-
queryMasters
For the given set of parameters, build a query on the masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(int linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(String linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider.objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Query that can be used to obtain values of the master entries.
-
queryMasters
public final Query queryMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String columns, String condition, String order, boolean any, int skip, int limit, int[] distinct) For the given set of parameters, build a query on the masters of this instance.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link to consider (as a condition).objectClass
- Type of instance to be checked.columns
- Columns (attribute names of the master) to be retrieved.condition
- SQL-style condition on attributes.order
- Order that can be specified as comma separated list of attributes.any
- If true, the system will look for all instances under extended classes too.skip
- Number of rows to be skipped before returning the results.limit
- Limit the number of rows.distinct
- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- Query that can be used to obtain values of the master entries.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Type of the link.objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link.objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countMasters
public final int countMasters(int linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Type of the link.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.- Returns:
- Count.
-
countMasters
public final int countMasters(String linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.- Returns:
- Count.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Type of the link (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link.objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Type of the link.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, int linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Type of the link.objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(String linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
countMasters
public final int countMasters(Transaction transaction, String linkType, Class<? extends StoredObject> objectClass, String condition, boolean any) For the given set of parameters, count the masters for which this instance is a link.- Parameters:
transaction
- Transaction for which the retrieval needs to be done.linkType
- Types of the link (as a condition).objectClass
- Type of instance to be checked.condition
- SQL-style condition on attributes.any
- If true, the system will look for all instances under extended classes too.- Returns:
- Count.
-
getAttachmentId
Get the stream data Id of the attachment available under this instance. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Parameters:
name
- Name of the attachment.- Returns:
- Id of the
StreamData
instance if available. Otherwise, null.
-
getAttachment
Get the attachment available under this instance as a stream data. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Parameters:
name
- Name of the attachment.- Returns:
StreamData
instance if available. Otherwise, null.
-
getFileData
Get the "file data"FileData
attachment instance available under this instance. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Type Parameters:
F
- File data type.- Parameters:
name
- Name of the file.- Returns:
FileData
instance if available. Otherwise, null.
-
getFileData
Get the "file data"FileData
attachment instance available under this instance for a given transaction. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Type Parameters:
F
- File date type.- Parameters:
name
- Name of the file.transaction
- Transaction.- Returns:
FileData
instance if available. Otherwise, null.
-
listFileData
List all "file data"FileData
attachments available under this instance. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Returns:
- Iterator of
FileData
instances.
-
listFileData
List all "file data"FileData
attachments available under this instance for a given transaction. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Parameters:
transaction
- Transaction.- Returns:
- Iterator of
FileData
instances.
-
existsFileData
public final boolean existsFileData()Check if any "file data"FileData
exists as attachment under this instance or not. (If attachments are defined viaAttachmentDefinition
,FileData
instances are added as links with link type = 9).- Returns:
- True or false.
-
objectLinks
Get the list of object links associated with this instance.- Parameters:
create
- Whether to create it if it is not yet created.- Returns:
- The list of object links or null no object links are defined.
-
objectLinks
Get the list of object links associated with this instance.- Returns:
- The list of object links or null no object links are defined or not yet created.
-
objectLink
Get the object link associated with this instance.- Parameters:
name
- Name of the link.- Returns:
- The object link or null if not yet created.
-
objectLink
Get the object link associated with this instance.- Parameters:
name
- Name of the link.create
- Whether to create it if it is not yet created.- Returns:
- The object link or null.
-
objectLink
Get the object link associated with this instance. (An instance is created if not exists).- Parameters:
sLink
- Link.- Returns:
- The object link.
-
clearObjectLinks
public final void clearObjectLinks()Clear all object links associated with this instance. -
toCode
Convert a string to a code. In many situations, some sort of code needs to be created from a string. For example, part number for an item in the inventory, an account number created from a numeric string etc. This method is a helper for that. By using this method, a consistent output can be expected. The output will contain only uppercase alphanumeric characters and special characters such as '-' and '/'. All other characters will be converted to '-' character. However, if repetitive '-' or '/' characters appears, only one instance will appear. Also, in the final output patterns such as "-/" and "/-" will be replaced with "/".Examples:
"123 345 366" will be converted to "123-345-266"
"abc156/2" will be converted to "ABC156/2"
Note: Characters '+' and '*' are copied verbatim to the output.
- Parameters:
code
- Code to be converted.- Returns:
- Converted code.
-
fill
- Specified by:
fill
in interfaceStringFiller
-
getExistsCondition
@Deprecated public static <O extends StoredObject> String getExistsCondition(Class<O> objectClass, String attributeName) Deprecated.You may useQueryBuilder.getExistsCondition(Class, String)
Create an "exists condition" that can be used for retrieving or queryingStoredObject
instances.- Type Parameters:
O
- Type of this object class.- Parameters:
objectClass
- The object class against which the existence should be checked.attributeName
- Attribute name that matches theId
of the object that is going to be retrieved or queried.- Returns:
- Condition string suitable for retrieving or querying another type of
StoredObject
instances where this object is related.
-
getExistsCondition
@Deprecated public static <O extends StoredObject> String getExistsCondition(Class<O> objectClass, String attributeName, String condition) Deprecated.Create an "exists condition" that can be used for retrieving or queryingStoredObject
instances.- Type Parameters:
O
- Type of this object class.- Parameters:
objectClass
- The object class against which the existence should be checked.attributeName
- Attribute name that matches theId
of the object that is going to be retrieved or queried.condition
- Condition to be applied to this object class. Null should be passed if no condition needs to be applied.- Returns:
- Condition string suitable for retrieving or querying another type of
StoredObject
instances where this object is related.
-
getNotExistsCondition
@Deprecated public static <O extends StoredObject> String getNotExistsCondition(Class<O> objectClass, String attributeName) Deprecated.Create a "not exists condition" that can be used for retrieving or queryingStoredObject
instances.- Type Parameters:
O
- Type of this object class.- Parameters:
objectClass
- The object class against which the existence should be checked.attributeName
- Attribute name that matches theId
of the object that is going to be retrieved or queried.- Returns:
- Condition string suitable for retrieving or querying another type of
StoredObject
instances where this object is related.
-
getNotExistsCondition
@Deprecated public static <O extends StoredObject> String getNotExistsCondition(Class<O> objectClass, String attributeName, String condition) Deprecated.Create a "not exists condition" that can be used for retrieving or queryingStoredObject
instances.- Type Parameters:
O
- Type of this object class.- Parameters:
objectClass
- The object class against which the existence should be checked.attributeName
- Attribute name that matches theId
of the object that is going to be retrieved or queried.condition
- Condition to be applied to this object class. Null should be passed if no condition needs to be applied.- Returns:
- Condition string suitable for retrieving or querying another type of
StoredObject
instances where this object is related.
-
QueryBuilder.getExistsCondition(Class, String)