Revision 33659 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/AbstractDocument.java
AbstractDocument.java | ||
---|---|---|
249 | 249 |
|
250 | 250 |
public static void registerPersistent() { |
251 | 251 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
252 |
DynStruct definition = manager.addDefinition( |
|
253 |
AbstractDocument.class, |
|
254 |
PERSISTENCE_DEFINITION_NAME, |
|
255 |
"Document persistence definition", |
|
256 |
null, |
|
257 |
null |
|
258 |
); |
|
259 |
definition.addDynFieldString("comment").setMandatory(false); |
|
260 |
definition.addDynFieldString("creationDate").setMandatory(true); |
|
261 |
definition.addDynFieldString("name").setMandatory(true); |
|
262 |
definition.addDynFieldString("owner").setMandatory(false); |
|
263 |
definition.addDynFieldBoolean("locked").setMandatory(true); |
|
252 |
DynStruct definition = manager.getDefinition(PERSISTENCE_DEFINITION_NAME); |
|
253 |
if ( definition == null ){ |
|
254 |
definition = manager.addDefinition( |
|
255 |
AbstractDocument.class, |
|
256 |
PERSISTENCE_DEFINITION_NAME, |
|
257 |
"Document persistence definition", |
|
258 |
null, |
|
259 |
null |
|
260 |
); |
|
261 |
definition.addDynFieldString("comment").setMandatory(false); |
|
262 |
definition.addDynFieldString("creationDate").setMandatory(true); |
|
263 |
definition.addDynFieldString("name").setMandatory(true); |
|
264 |
definition.addDynFieldString("owner").setMandatory(false); |
|
265 |
definition.addDynFieldBoolean("locked").setMandatory(true); |
|
266 |
} |
|
264 | 267 |
} |
265 | 268 |
|
266 | 269 |
public Project getProject() { |
Also available in: Unified diff