BEHAVIOR - The type of behavior.public class OutsideSqlEntityExecutor<BEHAVIOR> extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected BehaviorCommandInvoker |
_behaviorCommandInvoker
The invoker of behavior command.
|
protected DBDef |
_currentDBDef
The current database definition.
|
protected OutsideSqlExecutorFactory |
_outsideSqlExecutorFactory
The factory of outside-SQL executor.
|
protected OutsideSqlOption |
_outsideSqlOption
The option of outside-SQL.
|
protected String |
_tableDbName
The DB name of table.
|
| コンストラクタと説明 |
|---|
OutsideSqlEntityExecutor(BehaviorCommandInvoker behaviorCommandInvoker,
String tableDbName,
DBDef currentDBDef,
OutsideSqlOption outsideSqlOption,
OutsideSqlExecutorFactory outsideSqlExecutorFactory) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected <ENTITY> String |
buildSearchKey4Exception(String path,
Object pmb,
Class<ENTITY> entityType) |
OutsideSqlEntityExecutor<BEHAVIOR> |
configure(StatementConfig statementConfig)
Configure statement JDBC options.
|
protected OutsideSqlBasicExecutor<BEHAVIOR> |
createBasicExecutor() |
protected BehaviorExceptionThrower |
createBhvExThrower() |
protected <ENTITY> ENTITY |
doSelectEntity(String path,
Object pmb,
Class<ENTITY> entityType) |
protected <ENTITY> ENTITY |
doSelectEntityWithDeletedCheck(String path,
Object pmb,
Class<ENTITY> entityType) |
protected <ENTITY> List<ENTITY> |
doSelectList(String path,
Object pmb,
Class<ENTITY> entityType) |
OutsideSqlEntityExecutor<BEHAVIOR> |
formatSql()
Set up format-SQL for this outside-SQL.
|
protected static String |
ln()
Get the value of line separator.
|
OutsideSqlEntityExecutor<BEHAVIOR> |
removeBlockComment()
Set up remove-block-comment for this outside-SQL.
|
OutsideSqlEntityExecutor<BEHAVIOR> |
removeLineComment()
Set up remove-line-comment for this outside-SQL.
|
<ENTITY> ENTITY |
selectEntity(EntityHandlingPmb<BEHAVIOR,ENTITY> pmb)
Select entity by the outside-SQL.
|
<ENTITY> ENTITY |
selectEntity(String path,
Object pmb,
Class<ENTITY> entityType)
Select entity by the outside-SQL.
|
<ENTITY> ENTITY |
selectEntityWithDeletedCheck(EntityHandlingPmb<BEHAVIOR,ENTITY> pmb)
Select entity with deleted check by the outside-SQL.
|
<ENTITY> ENTITY |
selectEntityWithDeletedCheck(String path,
Object pmb,
Class<ENTITY> entityType)
Select entity with deleted check by the outside-SQL.
|
protected void |
throwSelectEntityAlreadyDeletedException(Object searchKey) |
protected void |
throwSelectEntityDuplicatedException(String resultCountExp,
Object searchKey,
Throwable cause) |
protected int |
xcheckSafetyResultAsOneIfNeed(Object pmb) |
protected void |
xrestoreSafetyResultIfNeed(Object pmb,
int preSafetyMaxResultSize) |
protected final BehaviorCommandInvoker _behaviorCommandInvoker
protected final String _tableDbName
protected final DBDef _currentDBDef
protected final OutsideSqlOption _outsideSqlOption
protected final OutsideSqlExecutorFactory _outsideSqlExecutorFactory
public OutsideSqlEntityExecutor(BehaviorCommandInvoker behaviorCommandInvoker, String tableDbName, DBDef currentDBDef, OutsideSqlOption outsideSqlOption, OutsideSqlExecutorFactory outsideSqlExecutorFactory)
public <ENTITY> ENTITY selectEntity(EntityHandlingPmb<BEHAVIOR,ENTITY> pmb)
SimpleMemberPmb pmb = new SimpleMemberPmb();
pmb.setMemberId(3);
SimpleMember member
= memberBhv.outsideSql().entityHandling().selectEntity(pmb);
if (member != null) {
... = member.get...();
} else {
...
}
ENTITY - The type of entity.pmb - The typed parameter-bean for entity handling. (NotNull)OutsideSqlNotFoundException - When the outside-SQL is not found.EntityDuplicatedException - When the entity is duplicated.public <ENTITY> ENTITY selectEntity(String path, Object pmb, Class<ENTITY> entityType)
String path = MemberBhv.PATH_selectSimpleMember;
SimpleMemberPmb pmb = new SimpleMemberPmb();
pmb.setMemberId(3);
Class<SimpleMember> entityType = SimpleMember.class;
SimpleMember member
= memberBhv.outsideSql().entityHandling().selectEntity(path, pmb, entityType);
if (member != null) {
... = member.get...();
} else {
...
}
ENTITY - The type of entity.path - The path of SQL file. (NotNull)pmb - The object as parameter-bean. Allowed types are Bean object and Map object. (NullAllowed)entityType - The type of entity. (NotNull)OutsideSqlNotFoundException - When the outside-SQL is not found.EntityDuplicatedException - When the entity is duplicated.protected <ENTITY> ENTITY doSelectEntity(String path, Object pmb, Class<ENTITY> entityType)
protected int xcheckSafetyResultAsOneIfNeed(Object pmb)
protected void xrestoreSafetyResultIfNeed(Object pmb, int preSafetyMaxResultSize)
protected <ENTITY> String buildSearchKey4Exception(String path, Object pmb, Class<ENTITY> entityType)
protected void throwSelectEntityDuplicatedException(String resultCountExp, Object searchKey, Throwable cause)
protected <ENTITY> List<ENTITY> doSelectList(String path, Object pmb, Class<ENTITY> entityType)
protected OutsideSqlBasicExecutor<BEHAVIOR> createBasicExecutor()
public <ENTITY> ENTITY selectEntityWithDeletedCheck(EntityHandlingPmb<BEHAVIOR,ENTITY> pmb)
SimpleMemberPmb pmb = new SimpleMemberPmb();
pmb.setMemberId(3);
SimpleMember member
= memberBhv.outsideSql().entityHandling().selectEntityWithDeletedCheck(pmb);
... = member.get...(); // the entity always be not null
ENTITY - The type of entity.pmb - The typed parameter-bean for entity handling. (NotNull)OutsideSqlNotFoundException - When the outside-SQL is not found.EntityAlreadyDeletedException - When the entity has already been deleted(not found).EntityDuplicatedException - When the entity is duplicated.public <ENTITY> ENTITY selectEntityWithDeletedCheck(String path, Object pmb, Class<ENTITY> entityType)
String path = MemberBhv.PATH_selectSimpleMember;
SimpleMemberPmb pmb = new SimpleMemberPmb();
pmb.setMemberId(3);
Class<SimpleMember> entityType = SimpleMember.class;
SimpleMember member
= memberBhv.outsideSql().entityHandling().selectEntityWithDeletedCheck(path, pmb, entityType);
... = member.get...(); // the entity always be not null
ENTITY - The type of entity.path - The path of SQL file. (NotNull)pmb - The parameter-bean. Allowed types are Bean object and Map object. (NullAllowed)entityType - The type of entity. (NotNull)OutsideSqlNotFoundException - When the outside-SQL is not found.EntityAlreadyDeletedException - When the entity has already been deleted(not found).EntityDuplicatedException - When the entity is duplicated.protected <ENTITY> ENTITY doSelectEntityWithDeletedCheck(String path, Object pmb, Class<ENTITY> entityType)
protected void throwSelectEntityAlreadyDeletedException(Object searchKey)
public OutsideSqlEntityExecutor<BEHAVIOR> removeBlockComment()
public OutsideSqlEntityExecutor<BEHAVIOR> removeLineComment()
public OutsideSqlEntityExecutor<BEHAVIOR> formatSql()
public OutsideSqlEntityExecutor<BEHAVIOR> configure(StatementConfig statementConfig)
statementConfig - The configuration of statement. (NullAllowed)protected BehaviorExceptionThrower createBhvExThrower()
protected static String ln()
Copyright © 2014–2015 The DBFlute Project. All rights reserved.