org.apache.cayenne.jpa.map
Class JpaTableGenerator

java.lang.Object
  extended by org.apache.cayenne.jpa.map.JpaTableGenerator

public class JpaTableGenerator
extends Object

A primary key generator based on a database table.

Author:
Andrus Adamchik

Field Summary
protected  int allocationSize
           
protected  String catalog
           
protected  int initialValue
           
protected  String name
           
protected  String pkColumnName
           
protected  String pkColumnValue
           
protected  String schema
           
protected  String table
           
protected  Collection<JpaUniqueConstraint> uniqueConstraints
           
protected  String valueColumnName
           
 
Constructor Summary
JpaTableGenerator()
           
JpaTableGenerator(TableGenerator annotation)
           
 
Method Summary
 int getAllocationSize()
           
 String getCatalog()
           
 int getInitialValue()
           
 String getName()
          Returns table generator name.
 String getPkColumnName()
           
 String getPkColumnValue()
           
 String getSchema()
           
 String getTable()
          Returns table generator table name.
 Collection<JpaUniqueConstraint> getUniqueConstraints()
           
 String getValueColumnName()
           
 void setAllocationSize(int allocationSize)
           
 void setCatalog(String catalog)
           
 void setInitialValue(int initialValue)
           
 void setName(String name)
           
 void setPkColumnName(String pkColumnName)
           
 void setPkColumnValue(String pkColumnValue)
           
 void setSchema(String schema)
           
 void setTable(String table)
           
 void setValueColumnName(String valueColumnName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

table

protected String table

catalog

protected String catalog

schema

protected String schema

pkColumnName

protected String pkColumnName

valueColumnName

protected String valueColumnName

pkColumnValue

protected String pkColumnValue

initialValue

protected int initialValue

allocationSize

protected int allocationSize

uniqueConstraints

protected Collection<JpaUniqueConstraint> uniqueConstraints
Constructor Detail

JpaTableGenerator

public JpaTableGenerator()

JpaTableGenerator

public JpaTableGenerator(TableGenerator annotation)
Method Detail

getAllocationSize

public int getAllocationSize()

setAllocationSize

public void setAllocationSize(int allocationSize)

getCatalog

public String getCatalog()

setCatalog

public void setCatalog(String catalog)

getInitialValue

public int getInitialValue()

setInitialValue

public void setInitialValue(int initialValue)

getName

public String getName()
Returns table generator name.

Specification Documenatation

Description: A unique generator name that can be referenced by one or more classes to be the generator for id values.


setName

public void setName(String name)

getPkColumnName

public String getPkColumnName()

setPkColumnName

public void setPkColumnName(String pkColumnName)

getPkColumnValue

public String getPkColumnValue()

setPkColumnValue

public void setPkColumnValue(String pkColumnValue)

getSchema

public String getSchema()

setSchema

public void setSchema(String schema)

getTable

public String getTable()
Returns table generator table name.

Specification Documentation

Description: Name of table that stores the generated id value.

Default: Name is chosen by persistence provider.


setTable

public void setTable(String table)

getValueColumnName

public String getValueColumnName()

setValueColumnName

public void setValueColumnName(String valueColumnName)

getUniqueConstraints

public Collection<JpaUniqueConstraint> getUniqueConstraints()


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