Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.merge
Class SetPrimaryKeyToDb

    java.lang.Object
      org.apache.cayenne.merge.AbstractToDbToken
          org.apache.cayenne.merge.SetPrimaryKeyToDb

All Implemented Interfaces:
  java.lang.Comparable<MergerToken>, MergerToken

    public class SetPrimaryKeyToDb

extends AbstractToDbToken

Constructor Summary
`SetPrimaryKeyToDb(DbEntity entity, java.util.Collection<DbAttribute> primaryKeyOriginal, java.util.Collection<DbAttribute> primaryKeyNew, java.lang.String detectedPrimaryKeyName)`

Method Summary
`protected void` | `appendAddNewPrimaryKeySQL(DbAdapter adapter, java.util.List<java.lang.String> sqls)`
`protected void` | `appendDropOriginalPrimaryKeySQL(DbAdapter adapter, java.util.List<java.lang.String> sqls)`
`int` | `compareTo(MergerToken o)`
`MergerToken` | `createReverse(MergerFactory factory)` Create a token with the reverse direction.
`java.util.List<java.lang.String>` | `createSql(DbAdapter adapter)`
`DbEntity` | `getEntity()`
`protected QuotingStrategy` | `getQuotingStrategy(DbAdapter adapter)`
`java.lang.String` | `getTokenName()`
`java.lang.String` | `getTokenValue()`

Methods inherited from class org.apache.cayenne.merge.AbstractToDbToken
`execute, executeSql, getDirection, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SetPrimaryKeyToDb

    public SetPrimaryKeyToDb(DbEntity entity,
                             java.util.Collection<DbAttribute> primaryKeyOriginal,
                             java.util.Collection<DbAttribute> primaryKeyNew,
                             java.lang.String detectedPrimaryKeyName)

Method Detail

### createSql

    public java.util.List<java.lang.String> createSql(DbAdapter adapter)

  Specified by:
    `createSql` in class `AbstractToDbToken`

### appendDropOriginalPrimaryKeySQL

    protected void appendDropOriginalPrimaryKeySQL(DbAdapter adapter,
                                                   java.util.List<java.lang.String> sqls)

### appendAddNewPrimaryKeySQL

    protected void appendAddNewPrimaryKeySQL(DbAdapter adapter,
                                             java.util.List<java.lang.String> sqls)

### createReverse

    public MergerToken createReverse(MergerFactory factory)

  Description copied from interface: `MergerToken`
  Create a token with the reverse direction. AddColumn in one direction becomes DropColumn in the other direction.

  Not all tokens are reversible.

### getTokenName

    public java.lang.String getTokenName()

### getEntity

    public DbEntity getEntity()

### getTokenValue

    public java.lang.String getTokenValue()

### getQuotingStrategy

    protected QuotingStrategy getQuotingStrategy(DbAdapter adapter)

### compareTo

    public int compareTo(MergerToken o)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.