Package org.iplass.mtp.entity
Class GenericEntity
java.lang.Object
org.iplass.mtp.entity.GenericEntity
- All Implemented Interfaces:
Serializable,Entity
Entityのデータを表現するクラス。
key-value形式で、Entityのプロパティの値を保持。
- See Also:
-
Field Summary
Fields inherited from interface org.iplass.mtp.entity.Entity
CREATE_BY, CREATE_DATE, DESCRIPTION, END_DATE, LOCKED_BY, NAME, OID, RECYCLE_BIN_ID, START_DATE, STATE, STATE_INVALID_VALUE, STATE_VALID_VALUE, UPDATE_BY, UPDATE_DATE, VERSION -
Constructor Summary
ConstructorsConstructorDescriptionGenericEntity(String definitionName) GenericEntity(String definitionName, String oid, String name) GenericEntity(EntityDefinition dataModelDefinition) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyProperties(Map<String, Object> properties) copy()shallow copyを行う。<T extends GenericEntity>
T引数の型のインスタンスとして、shallow copyを行う。deepCopy()deep copyを行う(但し、Entityとしてのdeep copy)。 property値が、GenericEntityの場合は、deepCopy()を再帰呼び出し、 BinaryReference、SelectValueの場合は、copy()を呼び出し、 java.uti.Dateの場合は、clone()を呼び出し、 それ以外(プリミティブ型、immutable)の場合は、参照をそのまま保持。getName()getOid()保持しているPropertyの名前セットを返します。getState()<P> PpropNameで表現されるプロパティを取得します。
注意
getValue(String, boolean)をenableExpression=trueで呼び出します。 propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティ値が取得される可能性があります。 enableExpression=falseで呼び出したい場合は、明示的にgetValue(String, boolean)を利用してください。<P> PpropNameで表現されるプロパティを取得します。 enableExpression=trueの場合、propNameには、"."にてネストされたプロパティ、 "[index]"にて配列アクセスを指定可能。
例えば、 "role.condition[0].name"は、getValue("role").getValue("condition")[0].getValue("name")を示す。
注意
enableExpression=trueの場合、propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティ値が取得される可能性があります。<P> PgetValueAs(Class<P> type, String propName) 指定の属性名の属性値を取得します。
propNameには、"."にてネストされたプロパティ、"[index]"にて配列アクセスを指定可能です。
例えば、 "role.condition[0].name"は、getValue("role").getValue("condition")[0].getValue("name")を示します。
注意
propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティ値が取得される可能性があります。
※現状の実装は、getValueと同じ(将来的には可能な限り値を変換するように実装する想定)。voidsetCreateBy(String createBy) voidsetCreateDate(Timestamp createDate) voidsetDefinitionName(String definitionName) voidsetDescription(String description) voidsetEndDate(Timestamp endDate) voidsetLockedBy(String lockedBy) voidvoidvoidsetRecycleBinId(Long recycleBinId) voidsetStartDate(Timestamp startDate) voidsetState(SelectValue state) voidsetUpdateBy(String updateBy) voidsetUpdateDate(Timestamp updateDate) voidpropNameで表現されるプロパティにvalueをセットします。
注意
setValue(String, Object, boolean)をenableExpression=trueで呼び出します。 propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティに値ががセットされる可能性があります。
enableExpression=falseで呼び出したい場合は、明示的にsetValue(String, Object, boolean)を利用してください。voidpropNameで表現されるプロパティにvalueをセットします。 enableExpression=trueの場合、propNameには、"."にてネストされたプロパティ、 "[index]"にて配列アクセスを指定可能です。
例えば、 "role.condition[0].name"は、getValue("role").getValue("condition")[0].getValue("name")を示します。
注意
enableExpression=trueの場合、propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティに値がセットされる可能性があります。voidsetVersion(Long version) toMap()保持しているPropertyをMap形式で返す。 property値が、GenericEntityの場合は、再帰的にMapに変換する、 GenericEntity[]の場合はMapの配列に変換する、 BinaryReference、SelectValueの場合は、copy()を呼び出し、 java.uti.Dateの場合は、clone()を呼び出し、 それ以外(プリミティブ型、immutable)の場合は、参照をそのまま保持。toString()
-
Constructor Details
-
GenericEntity
public GenericEntity() -
GenericEntity
-
GenericEntity
-
GenericEntity
-
-
Method Details
-
applyProperties
-
toString
-
getValue
propNameで表現されるプロパティを取得します。
注意
getValue(String, boolean)をenableExpression=trueで呼び出します。 propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティ値が取得される可能性があります。 enableExpression=falseで呼び出したい場合は、明示的にgetValue(String, boolean)を利用してください。 -
getValue
propNameで表現されるプロパティを取得します。 enableExpression=trueの場合、propNameには、"."にてネストされたプロパティ、 "[index]"にて配列アクセスを指定可能。
例えば、 "role.condition[0].name"は、getValue("role").getValue("condition")[0].getValue("name")を示す。
注意
enableExpression=trueの場合、propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティ値が取得される可能性があります。- Parameters:
propName-enableExpression-- Returns:
-
setValue
propNameで表現されるプロパティにvalueをセットします。
注意
setValue(String, Object, boolean)をenableExpression=trueで呼び出します。 propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティに値ががセットされる可能性があります。
enableExpression=falseで呼び出したい場合は、明示的にsetValue(String, Object, boolean)を利用してください。 -
setValue
propNameで表現されるプロパティにvalueをセットします。 enableExpression=trueの場合、propNameには、"."にてネストされたプロパティ、 "[index]"にて配列アクセスを指定可能です。
例えば、 "role.condition[0].name"は、getValue("role").getValue("condition")[0].getValue("name")を示します。
注意
enableExpression=trueの場合、propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティに値がセットされる可能性があります。- Parameters:
propName-value-enableExpression-
-
getOid
-
setOid
-
getName
-
setName
-
getCreateDate
- Specified by:
getCreateDatein interfaceEntity
-
setCreateDate
- Specified by:
setCreateDatein interfaceEntity
-
getUpdateDate
- Specified by:
getUpdateDatein interfaceEntity
-
setUpdateDate
- Specified by:
setUpdateDatein interfaceEntity
-
getCreateBy
- Specified by:
getCreateByin interfaceEntity
-
setCreateBy
- Specified by:
setCreateByin interfaceEntity
-
getUpdateBy
- Specified by:
getUpdateByin interfaceEntity
-
setUpdateBy
- Specified by:
setUpdateByin interfaceEntity
-
getValueAs
Description copied from interface:Entity指定の属性名の属性値を取得します。
propNameには、"."にてネストされたプロパティ、"[index]"にて配列アクセスを指定可能です。
例えば、 "role.condition[0].name"は、getValue("role").getValue("condition")[0].getValue("name")を示します。
注意
propNameはクライアントからの入力値を未検証のまま適用しないでください。 改竄された場合意図しないプロパティ値が取得される可能性があります。
※現状の実装は、getValueと同じ(将来的には可能な限り値を変換するように実装する想定)。- Specified by:
getValueAsin interfaceEntity- Returns:
-
getDefinitionName
- Specified by:
getDefinitionNamein interfaceEntity
-
setDefinitionName
- Specified by:
setDefinitionNamein interfaceEntity
-
getDescription
- Specified by:
getDescriptionin interfaceEntity
-
setDescription
- Specified by:
setDescriptionin interfaceEntity
-
getVersion
- Specified by:
getVersionin interfaceEntity
-
setVersion
- Specified by:
setVersionin interfaceEntity
-
getState
-
setState
-
getLockedBy
- Specified by:
getLockedByin interfaceEntity
-
setLockedBy
- Specified by:
setLockedByin interfaceEntity
-
getStartDate
- Specified by:
getStartDatein interfaceEntity
-
setStartDate
- Specified by:
setStartDatein interfaceEntity
-
getEndDate
- Specified by:
getEndDatein interfaceEntity
-
setEndDate
- Specified by:
setEndDatein interfaceEntity
-
getRecycleBinId
- Specified by:
getRecycleBinIdin interfaceEntity
-
setRecycleBinId
- Specified by:
setRecycleBinIdin interfaceEntity
-
copy
shallow copyを行う。- Returns:
-
copyAs
引数の型のインスタンスとして、shallow copyを行う。- Returns:
-
deepCopy
deep copyを行う(但し、Entityとしてのdeep copy)。 property値が、GenericEntityの場合は、deepCopy()を再帰呼び出し、 BinaryReference、SelectValueの場合は、copy()を呼び出し、 java.uti.Dateの場合は、clone()を呼び出し、 それ以外(プリミティブ型、immutable)の場合は、参照をそのまま保持。- Returns:
-
getPropertyNames
保持しているPropertyの名前セットを返します。- Returns:
- Property名のセット
-
toMap
保持しているPropertyをMap形式で返す。 property値が、GenericEntityの場合は、再帰的にMapに変換する、 GenericEntity[]の場合はMapの配列に変換する、 BinaryReference、SelectValueの場合は、copy()を呼び出し、 java.uti.Dateの場合は、clone()を呼び出し、 それ以外(プリミティブ型、immutable)の場合は、参照をそのまま保持。- Returns:
-