public class BasicPersistentEntity<T,P extends PersistentProperty<P>> extends ObjectSE implements MutablePersistentEntity<T,P>
PersistentEntity
の情報をキャプチャーする単純な値オブジェクト。コンストラクターと説明 |
---|
BasicPersistentEntity(TypeInformation<T> information) 指定された TypeInformation から新しい BasicPersistentEntity を作成します。 |
BasicPersistentEntity(TypeInformation<T> information, ComparatorSE<P> comparator) |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
doWithAll, getPersistentProperty, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty
forEachSE, spliteratorSE
public BasicPersistentEntity(TypeInformation<T> information)
TypeInformation
から新しい BasicPersistentEntity
を作成します。information
- null であってはなりません。public BasicPersistentEntity(TypeInformation<T> information, @Nullable ComparatorSE<P> comparator)
TypeInformation
および Comparator
SE の新しい BasicPersistentEntity
を作成します。指定された Comparator
SE は、エンティティに追加される PersistentProperty
インスタンスの順序を定義するために使用されます。information
- null であってはなりません。comparator
- null でもかまいません。@Nullable public PreferredConstructor<T,P> getPersistenceConstructor()
PersistentEntity
PersistentEntity
のオブジェクトをインスタンス化するために使用される PreferredConstructor
を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の getPersistenceConstructor
EntityInstantiator
を介して行われるか、カスタム変換メカニズムによって完全に処理されることを示しています。public boolean isConstructorArgument(PersistentProperty<?> property)
PersistentEntity
PersistentProperty
が PersistentEntity
のコンストラクター引数によって参照されるかどうかを返します。PersistentEntity<T, P extends PersistentProperty<P>>
の isConstructorArgument
property
- null でもかまいません。PersistentProperty
がコンストラクター引数によって参照される場合は true、そうでない場合は null。public boolean isIdProperty(PersistentProperty<?> property)
PersistentEntity
PersistentProperty
がエンティティの id プロパティであるかどうかを返します。PersistentEntity<T, P extends PersistentProperty<P>>
の isIdProperty
property
- null でもかまいません。public boolean isVersionProperty(PersistentProperty<?> property)
PersistentEntity
PersistentProperty
がエンティティのバージョンプロパティかどうかを返します。PersistentEntity<T, P extends PersistentProperty<P>>
の isVersionProperty
property
- null でもかまいません。public StringSE getName()
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の getName
@Nullable public P getIdProperty()
PersistentEntity
PersistentEntity
の id プロパティを返します。これがカスタム変換によって完全に処理されるエンティティである場合は、null にすることができます。PersistentEntity<T, P extends PersistentProperty<P>>
の getIdProperty
PersistentEntity
の id プロパティ。@Nullable public P getVersionProperty()
PersistentEntity
PersistentEntity
のバージョンプロパティを返します。エンティティで使用できるバージョンプロパティがない場合は null にできます。PersistentEntity<T, P extends PersistentProperty<P>>
の getVersionProperty
PersistentEntity
のバージョンプロパティ。public boolean hasIdProperty()
PersistentEntity
PersistentEntity
に id プロパティがあるかどうかを返します。この呼び出しが true を返す場合、PersistentEntity.getIdProperty()
は null 以外の値を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の hasIdProperty
public boolean hasVersionProperty()
PersistentEntity
PersistentEntity
にバージョンプロパティがあるかどうかを返します。この呼び出しが true を返す場合、PersistentEntity.getVersionProperty()
は null 以外の値を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の hasVersionProperty
public void addPersistentProperty(P property)
MutablePersistentEntity
PersistentProperty
を追加します。MutablePersistentEntity<T, P extends PersistentProperty<P>>
の addPersistentProperty
public void setEvaluationContextProvider(EvaluationContextProvider provider)
MutablePersistentEntity
EvaluationContextProvider
を設定します。MutablePersistentEntity<T, P extends PersistentProperty<P>>
の setEvaluationContextProvider
provider
- null であってはなりません。@Nullable protected P returnPropertyIfBetterIdPropertyCandidateOrNull(P property)
property
- 新しい id プロパティ候補。null になることはありません。public void addAssociation(Association<P> association)
MutablePersistentEntity
Association
を追加します。MutablePersistentEntity<T, P extends PersistentProperty<P>>
の addAssociation
@Nullable public P getPersistentProperty(StringSE name)
PersistentEntity
PersistentProperty
インスタンスを取得します。PersistentEntity<T, P extends PersistentProperty<P>>
の getPersistentProperty
name
- プロパティの名前。null にすることができます。PersistentProperty
、または存在しない場合は nullpublic IterableSE<P> getPersistentProperties(ClassSE<? extends AnnotationSE> annotationType)
PersistentEntity
Annotation
SE を備えたすべてのプロパティを返します。PersistentEntity<T, P extends PersistentProperty<P>>
の getPersistentProperties
annotationType
- null であってはなりません。Iterator
SE。null になることはありません。public ClassSE<T> getType()
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の getType
public Alias getTypeAlias()
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の getTypeAlias
public TypeInformation<T> getTypeInformation()
PersistentEntity
PersistentEntity
をサポートする TypeInformation
を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の getTypeInformation
public void doWithProperties(PropertyHandler<P> handler)
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の doWithProperties
handler
- null であってはなりません。public void doWithProperties(SimplePropertyHandler handler)
PersistentEntity<T, P extends PersistentProperty<P>>
の doWithProperties
public void doWithAssociations(AssociationHandler<P> handler)
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の doWithAssociations
handler
- null であってはなりません。public void doWithAssociations(SimpleAssociationHandler handler)
PersistentEntity<T, P extends PersistentProperty<P>>
の doWithAssociations
@Nullable public <A extends AnnotationSE> A findAnnotation(ClassSE<A> annotationType)
PersistentEntity
PersistentEntity
で指定された型のアノテーションを検索します。PersistentEntity<T, P extends PersistentProperty<P>>
の findAnnotation
annotationType
- null であってはなりません。public <A extends AnnotationSE> boolean isAnnotationPresent(ClassSE<A> annotationType)
PersistentEntity
PersistentEntity
に存在するかどうかを確認します。PersistentEntity<T, P extends PersistentProperty<P>>
の isAnnotationPresent
annotationType
- null であってはなりません。Annotation
SE が存在する場合は true。public void verify()
MutablePersistentEntity
PersistentEntity
の検証をトリガーするコールバックメソッド。MutablePersistentEntity
は不変ではないため、オブジェクトが最終状態に達した後に、いくつかの検証手順が必要になる場合があります。MutablePersistentEntity<T, P extends PersistentProperty<P>>
の verify
public void setPersistentPropertyAccessorFactory(PersistentPropertyAccessorFactory factory)
MutablePersistentEntity
PersistentPropertyAccessorFactory
を設定します。PersistentPropertyAccessorFactory
は、このエンティティのインスタンスの PersistentPropertyAccessor
を作成します。MutablePersistentEntity<T, P extends PersistentProperty<P>>
の setPersistentPropertyAccessorFactory
factory
- null であってはなりません。public <B> PersistentPropertyAccessor<B> getPropertyAccessor(B bean)
PersistentEntity
PersistentPropertyAccessor
を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の getPropertyAccessor
bean
- null であってはなりません。PersistentPropertyAccessor
。public <B> PersistentPropertyPathAccessor<B> getPropertyPathAccessor(B bean)
PersistentEntity
PersistentPropertyPathAccessor
を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の getPropertyPathAccessor
bean
- null であってはなりません。PersistentPropertyPathAccessor
public IdentifierAccessor getIdentifierAccessor(ObjectSE bean)
PersistentEntity
IdentifierAccessor
を返します。PersistentEntity<T, P extends PersistentProperty<P>>
の getIdentifierAccessor
bean
- null であってはなりません。IdentifierAccessor
。public boolean isNew(ObjectSE bean)
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の isNew
bean
- null であってはなりません。public boolean isImmutable()
PersistentEntity
PersistentEntity.getPropertyAccessor(Object)
を介して取得された PersistentPropertyAccessor
を介してインスタンスを変更しようとするべきではありません。PersistentEntity<T, P extends PersistentProperty<P>>
の isImmutable
Immutable
public boolean requiresPropertyPopulation()
PersistentEntity
PersistentEntity<T, P extends PersistentProperty<P>>
の requiresPropertyPopulation
public IteratorSE<P> iterator()
IterableSE<P extends PersistentProperty<P>>
の iteratorSE
protected EvaluationContext getEvaluationContext(ObjectSE rootObject)
rootObject
の EvaluationContext
を取得します。rootObject
- null であってはなりません。protected EvaluationContext getEvaluationContext(ObjectSE rootObject, ExpressionDependencies dependencies)
rootObject
- null であってはなりません。dependencies
- null であってはなりません。ExpressionDependencies
を満たす拡張機能がロードされた評価コンテキスト。protected IsNewStrategy getFallbackIsNewStrategy()
IsNewStrategy
を返します。デフォルトでは PersistentEntityIsNewStrategy
になります。この戦略は、エンティティが Persistable
を実装していない場合にのみ使用されることに注意してください。これは、エンティティが新しいかどうかをユーザーが制御することを望んでいるためです。Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.