public class JpaInboundChannelAdapterSpec extends MessageSourceSpec<JpaInboundChannelAdapterSpec,JpaPollingChannelAdapter> implements ComponentsRegistration
| 修飾子と型 | フィールドと説明 |
|---|---|
protected JpaExecutor | jpaExecutor |
PARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| 修飾子 | コンストラクターと説明 |
|---|---|
protected | JpaInboundChannelAdapterSpec(JpaExecutor jpaExecutor) |
| 修飾子と型 | メソッドと説明 |
|---|---|
JpaInboundChannelAdapterSpec | deleteAfterPoll(boolean deleteAfterPoll) "true" に設定されている場合、取得されたオブジェクトは、ポーリング時にデータベースから削除されます。 |
JpaInboundChannelAdapterSpec | deleteInBatch(boolean deleteInBatch) 設定されていない場合、このプロパティのデフォルトは false です。つまり、エンティティのコレクションが削除されている場合、オブジェクトごとに削除が行われます。 |
JpaInboundChannelAdapterSpec | entityClass(ClassSE<?> entityClass) データベースからエンティティを取得するために使用されているクラス型を指定します。 |
JpaInboundChannelAdapterSpec | expectSingleResult(boolean expectSingleResult) このパラメーターは、実行された JPA 操作からの結果として 1 つの結果オブジェクトのみが返されることを示します。 |
JpaInboundChannelAdapterSpec | flushAfterDelete(boolean flush)true に設定されている場合、EntityManager.flush()SE は永続化操作の後に呼び出されます。 |
MapSE<ObjectSE, StringSE> | getComponentsToRegister() |
JpaInboundChannelAdapterSpec | jpaQuery(StringSE jpaQuery) 永続的な操作を実行する JPA クエリを指定します。 |
JpaInboundChannelAdapterSpec | maxResults(int maxResults) 結果式の最大数を設定します。 |
JpaInboundChannelAdapterSpec | maxResultsExpression(Expression maxResultsExpression) 結果式の最大数には SpEL 式を指定します。 |
JpaInboundChannelAdapterSpec | maxResultsExpression(StringSE maxResultsExpression) 結果式の最大数には SpEL 式を指定します。 |
JpaInboundChannelAdapterSpec | namedQuery(StringSE namedQuery) 名前付きの JPQL ベースのクエリまたはネイティブ SQL クエリの名前を指定します。 |
JpaInboundChannelAdapterSpec | nativeQuery(StringSE nativeQuery) 永続的な操作を実行するネイティブ SQL クエリを指定します。 |
JpaInboundChannelAdapterSpec | parameterSource(ParameterSource parameterSource) 追加のパラメーターを提供するために使用される ParameterSource を指定します。 |
messageHeaders_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletoncloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEprotected final JpaExecutor jpaExecutor
protected JpaInboundChannelAdapterSpec(JpaExecutor jpaExecutor)
public JpaInboundChannelAdapterSpec entityClass(ClassSE<?> entityClass)
entityClass - 使用するエンティティ ClassSEpublic JpaInboundChannelAdapterSpec jpaQuery(StringSE jpaQuery)
jpaQuery - 使用する JPA クエリ。public JpaInboundChannelAdapterSpec nativeQuery(StringSE nativeQuery)
nativeQuery - 使用するネイティブ SQL クエリ。public JpaInboundChannelAdapterSpec namedQuery(StringSE namedQuery)
namedQuery - 事前設定されたクエリの名前。public JpaInboundChannelAdapterSpec deleteAfterPoll(boolean deleteAfterPoll)
deleteAfterPoll - デフォルトは "false" です。public JpaInboundChannelAdapterSpec deleteInBatch(boolean deleteInBatch)
false です。つまり、エンティティのコレクションが削除されている場合、オブジェクトごとに削除が行われます。"true" に設定すると、ペイロードの要素がバッチ操作として削除されます。これにより、カスケード削除に関して問題が発生することに注意してください。
仕様「JSR317:Java Persistence API、バージョン 2.0」は、バッチ操作でのカスケード削除をサポートしていません。仕様は 4.10 章に次のように述べています。
「削除操作は、指定されたクラスとそのサブクラスのエンティティにのみ適用されます。関連するエンティティにはカスケードされません。」
deleteInBatch - 設定されていない場合、デフォルトは "false" です。public JpaInboundChannelAdapterSpec flushAfterDelete(boolean flush)
true に設定されている場合、EntityManager.flush()SE は永続化操作の後に呼び出されます。flushSize が 1 に指定されている場合、同じ効果があります。永続化するために提供されたエンティティが IterableSE のインスタンスではない場合の便宜上。flush - デフォルトは "false" です。public JpaInboundChannelAdapterSpec parameterSource(ParameterSource parameterSource)
ParameterSource を指定します。parameterSource - 使用する ParameterSource。public JpaInboundChannelAdapterSpec expectSingleResult(boolean expectSingleResult)
true に設定し、JPA オペレーションの結果リストに含まれる要素が 1 つだけの場合、その 1 つの要素が抽出され、ペイロードとして返されます。expectSingleResult - 単一のオブジェクトが期待される場合は true。public JpaInboundChannelAdapterSpec maxResults(int maxResults)
maxResults - 取得する結果の最大数 public JpaInboundChannelAdapterSpec maxResultsExpression(StringSE maxResultsExpression)
maxResultsExpression - 結果の最大式。public JpaInboundChannelAdapterSpec maxResultsExpression(Expression maxResultsExpression)
maxResultsExpression - 結果の最大式。public MapSE<ObjectSE,StringSE> getComponentsToRegister()
ComponentsRegistration の getComponentsToRegister