|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 java.util.Map<java.lang.String,InsertField> |
columnMap
Maps column names to their corresponding InsertField instance. |
protected java.lang.String |
table
Database table |
Constructor Summary | |
---|---|
InsertRow(java.lang.String table)
Creates a new InsertRow instance for the given table. |
Method Summary | |
---|---|
InsertField |
getColumn(java.lang.String column)
Returns the InsertField for the given column name. |
java.util.Collection<InsertField> |
getColumns()
Returns all InsertField s. |
static java.util.List<InsertRow> |
getInsertOrder(java.util.List<InsertRow> inserts)
Sorts the given InsertRow s topologically (respecting the foreign key constraints), so they can be
inserted in the resulting order without causing foreign key violations. |
InsertField |
getPKColumn()
Returns the InsertField for the primary key column. |
(package private) java.util.List<InsertField> |
getReferencedFields()
Returns all InsertField s that are referenced by a field from this InsertRow . |
java.util.List<InsertField> |
getReferencingFields()
Returns all InsertField that reference a column in this InsertRow . |
(package private) java.util.Collection<InsertRow> |
getReferencingRows()
Returns all InsertRow s that reference a column in this InsertRow . |
java.lang.String |
getTable()
Returns the name of table. |
void |
linkColumn(java.lang.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(java.lang.String column,
java.lang.Object value,
int sqlType,
boolean isPK)
Sets the value to be inserted in the given table column. |
InsertGeometryField |
setGeometryColumn(java.lang.String column,
java.lang.Object value,
int sqlType,
boolean isPK,
int internalSrsCode)
Sets the value to be inserted in the given geometry column. |
java.lang.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 |
---|
protected java.lang.String table
protected java.util.Map<java.lang.String,InsertField> columnMap
InsertField
instance.
Constructor Detail |
---|
public InsertRow(java.lang.String table)
InsertRow
instance for the given table.
table
- Method Detail |
---|
public java.lang.String getTable()
public InsertField setColumn(java.lang.String column, java.lang.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 clashespublic InsertGeometryField setGeometryColumn(java.lang.String column, java.lang.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 clashespublic void linkColumn(java.lang.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 java.util.Collection<InsertField> getColumns()
InsertField
s.
public InsertField getColumn(java.lang.String column)
InsertField
for the given column name.
column
- requested column name
public InsertField getPKColumn()
InsertField
for the primary key column.
public java.util.List<InsertField> getReferencingFields()
InsertField
that reference a column in this InsertRow
. The fields may well be
from other tables.
java.util.Collection<InsertRow> getReferencingRows()
InsertRow
s that reference a column in this InsertRow
. The rows may well be from
other tables.
java.util.List<InsertField> getReferencedFields()
InsertField
s that are referenced by a field from this InsertRow
. The fields may
well be from other tables.
public static java.util.List<InsertRow> getInsertOrder(java.util.List<InsertRow> inserts)
InsertRow
s 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
public java.lang.String toString()
toString
in class java.lang.Object
|
deegree 2.5 (2011/06/29 09:44 build-8-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://www.deegree.org