public abstract class AbstractEntity extends Object implements Entity, DerivedMappable, Serializable, Cloneable
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected boolean |
__createdBySelect
Is the entity created by DBFlute select process?
|
protected EntityDerivedMap |
__derivedMap
The map of derived value, key is alias name.
|
protected EntityModifiedProperties |
__modifiedProperties
The modified properties for this entity.
|
protected EntityModifiedProperties |
__specifiedProperties
The modified properties for this entity.
|
protected EntityUniqueDrivenProperties |
__uniqueDrivenProperties
The unique-driven properties for this entity.
|
protected boolean |
_undefinedClassificationSelectAllowed
Does it allow selecting undefined classification code?
|
MAPPING_ALIAS_PREFIX| コンストラクタと説明 |
|---|
AbstractEntity() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
String |
buildDisplayString(String name,
boolean column,
boolean relation)
Build display string flexibly.
|
protected void |
checkClassificationCode(String columnDbName,
ClassificationMeta meta,
Object value) |
protected void |
checkSpecifiedProperty(String propertyName) |
void |
clearModifiedInfo()
Clear the information of modified properties.
|
void |
clearSpecifiedInfo()
Clear the information of specified properties.
|
void |
clearUniqueDrivenInfo()
Clear the information of unique-driven properties.
|
Entity |
clone()
Clone entity instance using super.clone().
|
protected String |
convertEmptyToNull(String value) |
boolean |
createdBySelect()
Is the entity created by DBFlute select process?
|
<VALUE> OptionalScalar<VALUE> |
derived(String aliasName,
Class<VALUE> propertyType)
Find the derived value from derived map by alias name (starts with '$').
|
protected abstract String |
doBuildColumnString(String dm) |
protected abstract String |
doBuildRelationString(String dm) |
protected abstract String |
doBuildStringWithRelation(String li) |
protected abstract boolean |
doEquals(Object obj) |
protected abstract int |
doHashCode(int initial) |
boolean |
equals(Object obj)
Determine the object is equal with this.
|
int |
hashCode()
Calculate the hash-code from primary-keys or columns.
|
boolean |
hasModification()
Does it have modifications of property names.
|
int |
instanceHash()
Calculate the hash-code, which is a default hash code, to identify the instance.
|
void |
markAsSelect()
Mark as select that means the entity is created by DBFlute select process.
|
void |
modifiedToSpecified()
Copy to modified properties to specified properties.
|
protected String |
mycutLargeStringForToString(String filteredStr) |
protected int |
mylargeStringForToStringLimit() |
Set<String> |
mymodifiedProperties()
Get the set of modified properties.
|
void |
mymodifyProperty(String propertyName)
Modify the property without setting value.
|
void |
mymodifyPropertyCancel(String propertyName)
Cancel the modified the property without resetting value.
|
protected String |
myremoveLineSepForToString(String filteredStr) |
Set<String> |
myspecifiedProperties()
Get the set of specified properties.
|
void |
myspecifyProperty(String propertyName)
Specify the property without setting value.
|
void |
myspecifyPropertyCancel(String propertyName)
Cancel the specified the property without resetting value.
|
protected TimeZone |
mytimeZone() |
boolean |
myundefinedClassificationAccessAllowed()
Does the access to undefined classification allowed?
|
void |
myuniqueByProperty(String propertyName)
Treat the property as unique driven without setting value.
|
void |
myuniqueByPropertyCancel(String propertyName)
Cancel the property as unique driven without resetting value.
|
Set<String> |
myuniqueDrivenProperties()
Get the properties of unique-driven columns as unique-driven.
|
void |
myunlockUndefinedClassificationAccess()
Unlock the access to undefined classification code.
|
protected String |
myutilDatePattern() |
protected EntityDerivedMap |
newDerivedMap() |
protected EntityModifiedProperties |
newModifiedProperties() |
protected <ELEMENT> List<ELEMENT> |
newReferrerList() |
protected EntityUniqueDrivenProperties |
newUniqueDrivenProperties() |
void |
registerDerivedValue(String aliasName,
Object selectedValue)
Register value derived by (Specify)DerivedReferrer.
|
protected void |
registerModifiedProperty(String propertyName) |
protected void |
registerSpecifiedProperty(String propertyName) |
protected Boolean |
toBoolean(Object obj) |
protected <NUMBER extends Number> |
toNumber(Object obj,
Class<NUMBER> type) |
String |
toString()
Convert to display string of entity's data.
|
String |
toStringWithRelation()
Convert the entity to display string with relation information.
|
protected String |
xbRDS(Entity et,
String name) |
protected int |
xCH(int hs,
Object vl) |
protected String |
xfBA(byte[] bytes) |
protected Object |
xfND(Object obj) |
protected String |
xfUD(Date date) |
protected boolean |
xSV(Object v1,
Object v2) |
asDBMeta, asTableDbName, hasPrimaryKeyValueprotected final EntityUniqueDrivenProperties __uniqueDrivenProperties
protected final EntityModifiedProperties __modifiedProperties
protected EntityModifiedProperties __specifiedProperties
protected EntityDerivedMap __derivedMap
protected boolean _undefinedClassificationSelectAllowed
protected boolean __createdBySelect
public void registerDerivedValue(String aliasName, Object selectedValue)
registerDerivedValue インタフェース内 DerivedMappablealiasName - The alias name of derived-referrer. (NotNull)selectedValue - The selected value from database. (NullAllowed)public <VALUE> OptionalScalar<VALUE> derived(String aliasName, Class<VALUE> propertyType)
mapping type: count() : Integer max(), min() : (same as property type of the column) sum(), avg() : BigDecimal e.g. use count() member.derived("$LOGIN_COUNT", Integer.class).alwaysPresent(loginCount -> { log(loginCount.getClass()); // is Integer ... }); e.g. use max() member.derived("$LATEST_PURCHASE_DATETIME", LocalDateTime.class).ifPresent(latestPurchaseDatetime -> { log(latestPurchaseDatetime.getClass()); // is LocalDateTime ... }); e.g. overview String highestAlias = "$HIGHEST_PURCHASE_PRICE"; memberBhv.selectEntity(cb -> { cb.specify().derivedPurchase().max(purchaseCB -> { purchaseCB.specify().columnPurchasePrice(); purchaseCB.query()... }, highestAlias); cb.query().setMemberId_Equal(1); ... }).alwaysPresent(member -> { ... = member.getMemberName(); member.derived(highestAlias, Integer.class).ifPresent(highestPurchasePrice -> { log(highestPurchasePrice); ... }); });
derived インタフェース内 DerivedMappableVALUE - The type of the value.aliasName - The alias name of derived-referrer, should start with '$'. (NotNull)propertyType - The type of the derived property, should match as rule. (NotNull)protected EntityDerivedMap newDerivedMap()
public Set<String> mymodifiedProperties()
mymodifiedProperties インタフェース内 Entitypublic void mymodifyProperty(String propertyName)
mymodifyProperty インタフェース内 EntitypropertyName - The property name of modified column. (NotNull)public void mymodifyPropertyCancel(String propertyName)
mymodifyPropertyCancel インタフェース内 EntitypropertyName - The property name of specified column. (NotNull)public void clearModifiedInfo()
clearModifiedInfo インタフェース内 Entitypublic boolean hasModification()
hasModification インタフェース内 Entityprotected EntityModifiedProperties newModifiedProperties()
protected void registerModifiedProperty(String propertyName)
public void modifiedToSpecified()
modifiedToSpecified インタフェース内 Entitypublic Set<String> myspecifiedProperties()
myspecifiedProperties インタフェース内 Entitypublic void myspecifyProperty(String propertyName)
myspecifyProperty インタフェース内 EntitypropertyName - The property name of specified column. (NotNull)public void myspecifyPropertyCancel(String propertyName)
myspecifyPropertyCancel インタフェース内 EntitypropertyName - The property name of specified column. (NotNull)public void clearSpecifiedInfo()
clearSpecifiedInfo インタフェース内 Entityprotected void checkSpecifiedProperty(String propertyName)
protected void registerSpecifiedProperty(String propertyName)
public Set<String> myuniqueDrivenProperties()
myuniqueDrivenProperties インタフェース内 Entityprotected EntityUniqueDrivenProperties newUniqueDrivenProperties()
public void myuniqueByProperty(String propertyName)
myuniqueByProperty インタフェース内 EntitypropertyName - The property name of unique-driven column. (NotNull)public void myuniqueByPropertyCancel(String propertyName)
myuniqueByPropertyCancel インタフェース内 EntitypropertyName - The property name of unique-driven column. (NotNull)public void clearUniqueDrivenInfo()
clearUniqueDrivenInfo インタフェース内 Entityprotected void checkClassificationCode(String columnDbName, ClassificationMeta meta, Object value)
public void myunlockUndefinedClassificationAccess()
myunlockUndefinedClassificationAccess インタフェース内 Entitypublic boolean myundefinedClassificationAccessAllowed()
myundefinedClassificationAccessAllowed インタフェース内 Entitypublic void markAsSelect()
markAsSelect インタフェース内 Entitypublic boolean createdBySelect()
createdBySelect インタフェース内 Entityprotected <ELEMENT> List<ELEMENT> newReferrerList()
public boolean equals(Object obj)
protected abstract boolean doEquals(Object obj)
obj - The object as other entity. (NotNull)public int hashCode()
protected abstract int doHashCode(int initial)
initial - The initial value to calculate hash-code.protected int xCH(int hs,
Object vl)
public int instanceHash()
instanceHash インタフェース内 Entitypublic String toString()
public String toStringWithRelation()
toStringWithRelation インタフェース内 Entitypublic String buildDisplayString(String name, boolean column, boolean relation)
buildDisplayString インタフェース内 Entityname - The name for display. (NullAllowed: If it's null, it does not have a name)column - Does it contains column values or not?relation - Does it contains relation existences or not?protected String myutilDatePattern()
protected TimeZone mytimeZone()
protected String xfBA(byte[] bytes)
protected int mylargeStringForToStringLimit()
public Entity clone()
clone クラス内 ObjectIllegalStateException - When it fails to clone the entity.Copyright © 2014–2015 The DBFlute Project. All rights reserved.