|
Lines 898-913
Link Here
|
| 898 |
|
898 |
|
| 899 |
/** |
899 |
/** |
| 900 |
* INTERNAL: |
900 |
* INTERNAL: |
| 901 |
* Execute the DDL to create this table. |
|
|
| 902 |
*/ |
| 903 |
public void createOnDatabase(AbstractSession session) throws EclipseLinkException { |
| 904 |
super.createOnDatabase(session); |
| 905 |
createIndexOnPrimaryKeyOnDatabase(session); |
| 906 |
createIndicesOnUniqueKeysOnDatabase(session); |
| 907 |
} |
| 908 |
|
| 909 |
/** |
| 910 |
* INTERNAL: |
| 911 |
* Return the delete SQL string. |
901 |
* Return the delete SQL string. |
| 912 |
*/ |
902 |
*/ |
| 913 |
public String deletionStringFor(DatabaseAccessor accessor) { |
903 |
public String deletionStringFor(DatabaseAccessor accessor) { |
|
Lines 995-1011
Link Here
|
| 995 |
} |
985 |
} |
| 996 |
|
986 |
|
| 997 |
/** |
987 |
/** |
| 998 |
* INTERNAL: |
|
|
| 999 |
* Execute the DDL to drop the table. |
| 1000 |
*/ |
| 1001 |
public void dropFromDatabase(AbstractSession session) throws EclipseLinkException { |
| 1002 |
// first drop indices on table's primary and unique keys (if required) |
| 1003 |
dropIndicesOnUniqueKeysOnDatabase(session); |
| 1004 |
dropIndexOnPrimaryKeyOnDatabase(session); |
| 1005 |
super.dropFromDatabase(session); |
| 1006 |
} |
| 1007 |
|
| 1008 |
/** |
| 1009 |
* INTERNAL:<br/> |
988 |
* INTERNAL:<br/> |
| 1010 |
* Write the SQL drop index string to drop index on PK if passed a writer, |
989 |
* Write the SQL drop index string to drop index on PK if passed a writer, |
| 1011 |
* else delegate to a method that executes the string on the database. |
990 |
* else delegate to a method that executes the string on the database. |
|
Lines 1146-1165
Link Here
|
| 1146 |
|
1125 |
|
| 1147 |
/** |
1126 |
/** |
| 1148 |
* INTERNAL: |
1127 |
* INTERNAL: |
| 1149 |
* Execute the DDL to drop the table. Either directly from the database |
|
|
| 1150 |
* of write out the statement to a file. |
| 1151 |
*/ |
1128 |
*/ |
| 1152 |
public void dropObject(AbstractSession session, Writer schemaWriter, boolean createSQLFiles) throws EclipseLinkException { |
|
|
| 1153 |
// first drop indices on table's primary and unique keys (if required) |
| 1154 |
setCreateSQLFiles(createSQLFiles); |
| 1155 |
dropIndicesOnUniqueKeys(session, schemaWriter); |
| 1156 |
dropIndexOnPrimaryKey(session, schemaWriter); |
| 1157 |
super.dropObject(session, schemaWriter, createSQLFiles); |
| 1158 |
} |
| 1159 |
|
| 1160 |
/** |
| 1161 |
* INTERNAL: |
| 1162 |
*/ |
| 1163 |
HashMap<String, ForeignKeyConstraint> getForeignKeyMap() { |
1129 |
HashMap<String, ForeignKeyConstraint> getForeignKeyMap() { |
| 1164 |
return foreignKeyMap; |
1130 |
return foreignKeyMap; |
| 1165 |
} |
1131 |
} |
|
Lines 1222-1227
Link Here
|
| 1222 |
} |
1188 |
} |
| 1223 |
|
1189 |
|
| 1224 |
/** |
1190 |
/** |
|
|
1191 |
* Execute any statements required before the deletion of the object |
| 1192 |
* @param session |
| 1193 |
* @param dropSchemaWriter |
| 1194 |
*/ |
| 1195 |
public void preDropObject(AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles){ |
| 1196 |
// drop indices on table's primary and unique keys (if required) |
| 1197 |
setCreateSQLFiles(createSQLFiles); |
| 1198 |
dropIndicesOnUniqueKeys(session, dropSchemaWriter); |
| 1199 |
dropIndexOnPrimaryKey(session, dropSchemaWriter); |
| 1200 |
} |
| 1201 |
|
| 1202 |
/** |
| 1225 |
* PUBLIC: |
1203 |
* PUBLIC: |
| 1226 |
*/ |
1204 |
*/ |
| 1227 |
public void setFields(Vector<FieldDefinition> fields) { |
1205 |
public void setFields(Vector<FieldDefinition> fields) { |