Package com.storedobject.core
Class PersonRole
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.core.PersonRole
- All Implemented Interfaces:
Displayable
,StringFiller
,HasContacts
,HasId
,HasName
,OfEntity
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static String[]
static <T extends PersonRole>
Tget
(SystemEntity systemEntity, Class<T> roleClass, Person person) static <T extends PersonRole>
Tget
(SystemEntity systemEntity, Class<T> roleClass, Person person, boolean any) static <T extends PersonRole>
TgetByName
(SystemEntity systemEntity, Class<T> roleClass, String name) static <T extends PersonRole>
TgetByName
(SystemEntity systemEntity, Class<T> roleClass, String name, boolean any) static <T extends PersonRole>
TgetByPersonId
(SystemEntity systemEntity, Class<T> roleClass, Id personId) static <T extends PersonRole>
TgetByPersonId
(SystemEntity systemEntity, Class<T> roleClass, Id personId, boolean any) Get theId
of the object that owns the contact.getName()
Name of the contact.Gets the unique index condition of this object.static void
boolean
isActive()
Check if this role is currently active or not.static <T extends PersonRole>
ObjectIterator<T> listByName
(SystemEntity systemEntity, Class<T> roleClass, String name) static <T extends PersonRole>
ObjectIterator<T> listByName
(SystemEntity systemEntity, Class<T> roleClass, String name, boolean any) void
void
void
setPerson
(BigDecimal idValue) void
setSystemEntity
(Id systemEntityId) void
setSystemEntity
(SystemEntity systemEntity) void
setSystemEntity
(BigDecimal idValue) toString()
String representation of the instance.void
This will be invoked by the system whenever the object is saved to the DB.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAttachment, getAttachmentId, getChildren, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.storedobject.core.HasContacts
getAddress, getAddress, getContact, getContact, getContactGroupingCode, getContactObject, getContactObject, getContactObject, getContactRaw, getContactRaw, getEmail, getEmail, getId, getMobile, getPhone, getPhone, getTelegram, listContacts, listContactTypes, setContact, setContact
Methods inherited from interface com.storedobject.core.OfEntity
check, findSystemEntityId
-
Constructor Details
-
PersonRole
public PersonRole()
-
-
Method Details
-
columns
-
indices
-
getUniqueCondition
Description copied from class:StoredObject
Gets the unique index condition of this object.- Overrides:
getUniqueCondition
in classStoredObject
- Returns:
- Unique index condition.
-
displayColumns
-
setPerson
-
setPerson
-
setPerson
-
getPersonId
-
getPerson
-
setSystemEntity
- Specified by:
setSystemEntity
in interfaceOfEntity
-
setSystemEntity
-
setSystemEntity
-
getSystemEntityId
- Specified by:
getSystemEntityId
in interfaceOfEntity
-
getSystemEntity
- Specified by:
getSystemEntity
in interfaceOfEntity
-
validateData
Description copied from class:StoredObject
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.
- Overrides:
validateData
in classStoredObject
- Parameters:
tm
- Current transaction manager.- Throws:
Exception
- If data is invalid.
-
toString
Description copied from class:StoredObject
String representation of the instance. Mostly used for logging purposes.- Overrides:
toString
in classStoredObject
- Returns:
- String representation of the instance.
-
get
public static <T extends PersonRole> T get(SystemEntity systemEntity, Class<T> roleClass, Person person) -
get
public static <T extends PersonRole> T get(SystemEntity systemEntity, Class<T> roleClass, Person person, boolean any) -
getByPersonId
public static <T extends PersonRole> T getByPersonId(SystemEntity systemEntity, Class<T> roleClass, Id personId) -
getByPersonId
public static <T extends PersonRole> T getByPersonId(SystemEntity systemEntity, Class<T> roleClass, Id personId, boolean any) -
getByName
public static <T extends PersonRole> T getByName(SystemEntity systemEntity, Class<T> roleClass, String name) -
getByName
public static <T extends PersonRole> T getByName(SystemEntity systemEntity, Class<T> roleClass, String name, boolean any) -
listByName
public static <T extends PersonRole> ObjectIterator<T> listByName(SystemEntity systemEntity, Class<T> roleClass, String name) -
listByName
public static <T extends PersonRole> ObjectIterator<T> listByName(SystemEntity systemEntity, Class<T> roleClass, String name, boolean any) -
getContactOwnerId
Description copied from interface:HasContacts
Get theId
of the object that owns the contact. (It is possible that some other related object may be owing the contact information).- Specified by:
getContactOwnerId
in interfaceHasContacts
- Returns:
- By default, the same instance of the class owns the contact and thus, it returns
StoredObject.getId()
.
-
getName
Description copied from interface:HasContacts
Name of the contact. The default implementation returnsnull
.- Specified by:
getName
in interfaceHasContacts
- Specified by:
getName
in interfaceHasName
- Returns:
- Name of the contact.
-
isActive
public boolean isActive()Check if this role is currently active or not.- Returns:
- True/false.
-