|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.io.datastore.sql.transaction.insert.InsertRow
public class InsertRow
Represents a table row (columns + values) which has to be inserted as part of an Insert
operation.
| Field Summary | |
|---|---|
protected Map<String,InsertField> |
columnMap
|
(package private) static ILogger |
LOG
|
protected String |
table
|
| Constructor Summary | |
|---|---|
InsertRow(String table)
Creates a new InsertRow instance for the given table. |
|
| Method Summary | |
|---|---|
static Collection<InsertRow> |
findCycle(Collection<InsertRow> rows)
Checks if the given InsertRows contain cyclic fk constraints. |
InsertField |
getColumn(String column)
Returns the InsertField for the given column name. |
Collection<InsertField> |
getColumns()
Returns all InsertFields. |
InsertField |
getPKColumn()
Returns the InsertField for the primary key column. |
(package private) List<InsertField> |
getReferencedFields()
Returns all InsertFields that are referenced by a field from this
InsertRow. |
List<InsertField> |
getReferencingFields()
Returns all InsertField that reference a column in this InsertRow. |
(package private) Collection<InsertRow> |
getReferencingRows()
Returns all InsertRows that reference a column in this InsertRow. |
String |
getTable()
Returns the name of table. |
void |
linkColumn(String column,
InsertField referencedField)
Sets the value to be inserted in the given table column - the column references the given InsertField and thus must have the same value as the referenced column. |
InsertField |
setColumn(String column,
Object value,
int sqlType,
boolean isPK)
Sets the value to be inserted in the given table column. |
InsertGeometryField |
setGeometryColumn(String column,
Object value,
int sqlType,
boolean isPK,
int internalSrsCode)
Sets the value to be inserted in the given geometry column. |
static List<InsertRow> |
sortInsertRows(List<InsertRow> inserts)
Sorts the given InsertRows topologically (respecting the foreign key
constraints), so they can be inserted in the resulting order without causing foreign key
violations. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final ILogger LOG
protected String table
protected Map<String,InsertField> columnMap
| Constructor Detail |
|---|
public InsertRow(String table)
InsertRow instance for the given table.
table - | Method Detail |
|---|
public String getTable()
public InsertField setColumn(String column,
Object value,
int sqlType,
boolean isPK)
throws TransactionException
In complex + erroneous mappings (or feature instances), it may happen that different property
values (mapped to the same column) imply different values. This is checked for and in case an
TransactionException is thrown.
column - value - sqlType - isPK -
TransactionException - if the value for the column clashes
public InsertGeometryField setGeometryColumn(String column,
Object value,
int sqlType,
boolean isPK,
int internalSrsCode)
throws TransactionException
In complex + erroneous mappings (or feature instances), it may happen that different property
values (mapped to the same column) imply different values. This is checked for and in case an
TransactionException is thrown.
column - value - sqlType - isPK - internalSrsCode -
TransactionException - if the value for the column clashes
public void linkColumn(String column,
InsertField referencedField)
throws TransactionException
InsertField and thus must have the same value as the referenced column.
In complex + erroneous mappings (or feature instances), it may happen that different property
values (mapped to the same column) imply different values. This is checked for and in case an
TransactionException is thrown.
column - referencedField -
TransactionException - if the value for the column clashespublic Collection<InsertField> getColumns()
InsertFields.
public InsertField getColumn(String column)
InsertField for the given column name.
column - requested column name
public InsertField getPKColumn()
InsertField for the primary key column.
public List<InsertField> getReferencingFields()
InsertField that reference a column in this InsertRow.
The fields may well be from other tables.
Collection<InsertRow> getReferencingRows()
InsertRows that reference a column in this InsertRow.
The rows may well be from other tables.
List<InsertField> getReferencedFields()
InsertFields that are referenced by a field from this
InsertRow. The fields may well be from other tables.
public static List<InsertRow> sortInsertRows(List<InsertRow> inserts)
throws TransactionException
InsertRows topologically (respecting the foreign key
constraints), so they can be inserted in the resulting order without causing foreign key
violations.
Number of precedessors (pre): number of fields that *are referenced by* this row Number of successors (post) : number of fields that *reference* this row
inserts - insert rows to sort
TransactionException - if there is no topological order (i.e. there is a cyclic constraint)public static Collection<InsertRow> findCycle(Collection<InsertRow> rows)
InsertRows contain cyclic fk constraints.
rows -
public String toString()
toString in class Object
|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net