public class SetPrimaryKeyToDb extends AbstractToDbToken
Constructor and Description |
---|
SetPrimaryKeyToDb(DbEntity entity,
Collection<DbAttribute> primaryKeyOriginal,
Collection<DbAttribute> primaryKeyNew,
String detectedPrimaryKeyName) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendAddNewPrimaryKeySQL(DbAdapter adapter,
List<String> sqls) |
protected void |
appendDropOriginalPrimaryKeySQL(DbAdapter adapter,
List<String> sqls) |
int |
compareTo(MergerToken o) |
MergerToken |
createReverse(MergerFactory factory)
Create a token with the reverse direction.
|
List<String> |
createSql(DbAdapter adapter) |
DbEntity |
getEntity() |
protected QuotingStrategy |
getQuotingStrategy(DbAdapter adapter) |
String |
getTokenName() |
String |
getTokenValue() |
execute, executeSql, getDirection, toString
public SetPrimaryKeyToDb(DbEntity entity, Collection<DbAttribute> primaryKeyOriginal, Collection<DbAttribute> primaryKeyNew, String detectedPrimaryKeyName)
public List<String> createSql(DbAdapter adapter)
createSql
in class AbstractToDbToken
protected void appendDropOriginalPrimaryKeySQL(DbAdapter adapter, List<String> sqls)
protected void appendAddNewPrimaryKeySQL(DbAdapter adapter, List<String> sqls)
public MergerToken createReverse(MergerFactory factory)
MergerToken
Not all tokens are reversible.
public String getTokenName()
public DbEntity getEntity()
public String getTokenValue()
protected QuotingStrategy getQuotingStrategy(DbAdapter adapter)
public int compareTo(MergerToken o)
Copyright © 2001–2018 Apache Cayenne. All rights reserved.