velosurf.model
Class ExportedKey

java.lang.Object
  extended by velosurf.model.Attribute
      extended by velosurf.model.ExportedKey

public class ExportedKey
extends Attribute

An exported key (aka primary key used in a foreign key) attribute.


Field Summary
private  java.util.List<java.lang.String> fkCols
          List of foreign keys.
private  java.lang.String order
          Order
 
Fields inherited from class velosurf.model.Attribute
db, entity, query, resultEntity, ROW, ROWSET, SCALAR, UNDEFINED
 
Constructor Summary
ExportedKey(java.lang.String name, Entity entity, java.lang.String fkEntity, java.util.List<java.lang.String> fkCols)
          Exported key constructor.
 
Method Summary
 java.util.List<java.lang.String> getFKCols()
          Foreign key columns getter.
protected  java.lang.String getQuery()
          Query getter.
 void setFKCols(java.util.List<java.lang.String> fkCols)
          Foreign key columns setter.
 void setOrder(java.lang.String order)
          Set order
 java.lang.String toString()
          Debug method.
 
Methods inherited from class velosurf.model.Attribute
addParamName, evaluate, fetch, getCaching, getDB, getEntity, getName, getResultEntity, getType, query, query, setCaching, setForeignKeyColumn, setQuery, setResultEntity, setResultType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fkCols

private java.util.List<java.lang.String> fkCols
List of foreign keys.


order

private java.lang.String order
Order

Constructor Detail

ExportedKey

public ExportedKey(java.lang.String name,
                   Entity entity,
                   java.lang.String fkEntity,
                   java.util.List<java.lang.String> fkCols)
Exported key constructor.

Parameters:
name - name of this exported key
entity - parent entity
fkEntity - foreign key entity
fkCols - foreign key columns
Method Detail

getFKCols

public java.util.List<java.lang.String> getFKCols()
Foreign key columns getter.

Returns:
foreign key columns list

setFKCols

public void setFKCols(java.util.List<java.lang.String> fkCols)
Foreign key columns setter.

Parameters:
fkCols - foreign key columns list

setOrder

public void setOrder(java.lang.String order)
Set order


getQuery

protected java.lang.String getQuery()
Query getter.

Overrides:
getQuery in class Attribute
Returns:
the SQL query

toString

public java.lang.String toString()
Debug method.

Overrides:
toString in class Attribute
Returns:
the definition string of this attribute


~ooOoo~