litesoft
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
// This Source Code is in the Public Domain per: http://unlicense.org package org.litesoft.or; import java.sql.*; import java.util.*; import org.litesoft.bo.attributes.*; import org.litesoft.core.util.*; import org.litesoft.orsup.base.*; import org.litesoft.orsup.lazyload.*; import org.litesoft.orsup.nonpublic.*; import org.litesoft.orsup.otherattributeaccessors.*; import org.litesoft.orsup.selection.*; import org.litesoft.orsup.transact.*; public abstract class DBNodePO extends PersistentObjectImpl<DBNode> { private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl(); public static SimpleFromIdentifier from() { return DBNodeMetaData.INSTANCE; } protected DBNodePO( Transaction pTransaction ) // Only used for New { super( DBNodeMetaData.INSTANCE, pTransaction ); mID = getNextSequenceNumber( getClass() ); registerWithTransaction(); } protected DBNodePO( ConstructionControl pConstructionControl ) { super( DBNodeMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl ); } public static final AttributeAccessorSCD CD_RecordVersion = new AttributeAccessor_RecordVersion(); protected final RecordVersionHelper mRecordVersion = new RecordVersionHelper(); public Long getRecordVersion() { return mRecordVersion.getRecordVersion(); } private static class AttributeAccessor_RecordVersion extends AttributeAccessorSCD_RecordVersion<DBNode> { public AttributeAccessor_RecordVersion() { super( "RecordVersion", "RecordVersion" ); } protected RecordVersionHelper getRecordVersionHelper( DBNode pPO ) { return pPO.mRecordVersion; } } public static final AttributeAccessorSCD CD_ID = new AttributeAccessor_ID(); private Long mID = null; public Long getID() { return mID; } protected void LLsetID( Long pID ) { verifyMutability( CD_ID, mID, pID ); mID = pID; } private static class AttributeAccessor_ID extends AttributeAccessorSCDsimplePersistedReadOnly<DBNode> implements NonImportableFeature { public AttributeAccessor_ID() { super( "ID", "id", true, _Long ); } public Object getValueOnPO( DBNode pPO ) { return pPO.getID(); } public void db_setValueOnPO( DBNode pPO, Object pValue ) { pPO.LLsetID( to_Long( pValue ) ); } } public static final AttributeAccessorSCD CD_Name = new AttributeAccessor_Name(); private String mName; public String getName() { return mName; } public void setName( String pName ) { verifyMutability( CD_Name, mName, pName ); mName = pName; } private static class AttributeAccessor_Name extends AttributeAccessorSCDsimplePersistedRegular<DBNode> { public AttributeAccessor_Name() { super( "Name", "Name", false, _String.with( MaxLength.of( 255 ) ) ); } public Object getValueOnPO( DBNode pPO ) { return pPO.getName(); } public void setValueOnPO( DBNode pPO, Object pValue ) { pPO.setName( to_String( pValue ) ); } } public static final AttributeAccessorSCD CD_Description = new AttributeAccessor_Description(); private String mDescription = null; public String getDescription() { return mDescription; } public void setDescription( String pDescription ) { verifyMutability( CD_Description, mDescription, pDescription ); mDescription = pDescription; } private static class AttributeAccessor_Description extends AttributeAccessorSCDsimplePersistedRegular<DBNode> { public AttributeAccessor_Description() { super( "Description", "description", false, _Text ); } public Object getValueOnPO( DBNode pPO ) { return pPO.getDescription(); } public void setValueOnPO( DBNode pPO, Object pValue ) { pPO.setDescription( to_String( pValue ) ); } } public static final AttributeAccessorSCD CD_DateShipped = new AttributeAccessor_DateShipped(); private Timestamp mDateShipped = null; public Timestamp getDateShipped() { return mDateShipped; } public void setDateShipped( Timestamp pDateShipped ) { verifyMutability( CD_DateShipped, mDateShipped, pDateShipped ); mDateShipped = pDateShipped; } private static class AttributeAccessor_DateShipped extends AttributeAccessorSCDsimplePersistedRegular<DBNode> { public AttributeAccessor_DateShipped() { super( "DateShipped", "dateShipped", false, _SimpleTimestamp ); } public Object getValueOnPO( DBNode pPO ) { return pPO.getDateShipped(); } public void setValueOnPO( DBNode pPO, Object pValue ) { pPO.setDateShipped( to_Timestamp( pValue ) ); } } public static final AttributeAccessorSCDtoOneRegular<DBNode, DBNode> CD_Parent = new AttributeAccessor_Parent(); protected LazyLoadToOneRegular<DBNode, DBNode> mParent = new LazyLoadToOneRegular<DBNode, DBNode>( (DBNode) this, CD_Parent ); // Note: DBNode is the related TO object public DBNode getParent() { return processLazyLoadAccess( mParent ); } public void setParent( DBNode pParent ) { processLazyLoadMutation( mParent, pParent ); } private static class AttributeAccessor_Parent extends AttributeAccessorSCDtoOneRegular<DBNode, DBNode> { public AttributeAccessor_Parent() { super( "Parent", "parent_id", DBNode.class, "ID", "DBNodeSetForParent", false, false, Mutability.RW ); } public LazyLoadToOneRegular<DBNode, DBNode> getValueHolder( DBNode pPO ) { return pPO.mParent; } public Object getValueOnPO( DBNode pPO ) { return pPO.getParent(); } public void setValueOnPO( DBNode pPO, Object pValue ) { pPO.setParent( to_PO( pPO, DBNode.class, pValue ) ); } public Object db_getValueOnPO( DBNode pPO ) { return pPO.mParent.db_getValue(); } public void db_setValueOnPO( DBNode pPO, Object pValue ) { pPO.mParent.db_setValue( to_Long( pValue ) ); } } public static final AttributeAccessorSCDtoManyRegular<DBNode, DBNode> CD_DBNodeSetForParent = new AttributeAccessor_DBNodeSetForParent(); protected LazyLoadToManyRegular<DBNode, DBNode> mDBNodeSetForParent = new LazyLoadToManyRegular<DBNode, DBNode>( (DBNode) this, CD_DBNodeSetForParent ); // Note: DBNode is the related TO object public List<DBNode> getDBNodeSetForParent() { return processLazyLoadAccess( mDBNodeSetForParent ); } public void setDBNodeSetForParent( List<DBNode> pDBNodeSetForParent ) { processLazyLoadMutation( mDBNodeSetForParent, pDBNodeSetForParent ); } public void addDBNodeSetForParent( DBNode pDBNodeSetForParent ) { processLazyLoadMutationAdd( mDBNodeSetForParent, pDBNodeSetForParent ); } public void removeDBNodeSetForParent( DBNode pDBNodeSetForParent ) { processLazyLoadMutationRemove( mDBNodeSetForParent, pDBNodeSetForParent ); } private static class AttributeAccessor_DBNodeSetForParent extends AttributeAccessorSCDtoManyRegular<DBNode, DBNode> { public AttributeAccessor_DBNodeSetForParent() { super( "DBNodeSetForParent", "ID", DBNode.class, "Parent", "Name", Mutability.RW, false, true ); } public LazyLoadToManyRegular<DBNode, DBNode> getValueHolder( DBNode pPO ) { return pPO.mDBNodeSetForParent; } public Object getValueOnPO( DBNode pPO ) { return pPO.getDBNodeSetForParent(); } public void setValueOnPO( DBNode pPO, Object pValue ) { pPO.setDBNodeSetForParent( to_POs( pPO, DBNode.class, pValue ) ); } public void addValueOnPO( DBNode pPO, Object pValue ) { pPO.addDBNodeSetForParent( to_PO( pPO, DBNode.class, pValue ) ); } public void removeValueOnPO( DBNode pPO, Object pValue ) { pPO.removeDBNodeSetForParent( to_PO( pPO, DBNode.class, pValue ) ); } } public static final AttributeAccessorSCD CD_SnagColumn = new AttributeAccessor_SnagColumn(); private Long mSnagColumn = null; public Long getSnagColumn() { return mSnagColumn; } protected void LLsetSnagColumn( Long pSnagColumn ) { verifyMutability( CD_SnagColumn, mSnagColumn, pSnagColumn ); mSnagColumn = pSnagColumn; } private static class AttributeAccessor_SnagColumn extends AttributeAccessorSCDsimplePersistedReadOnly<DBNode> implements NonImportableFeature { public AttributeAccessor_SnagColumn() { super( "SnagColumn", "SnagColumn", false, _Long ); } public Object getValueOnPO( DBNode pPO ) { return pPO.getSnagColumn(); } public void db_setValueOnPO( DBNode pPO, Object pValue ) { pPO.LLsetSnagColumn( to_Long( pValue ) ); } } static class MyMetaData extends PersistentObjectImplMetaData<DBNode> { public static final String OBJECT_NAME = "DBNode"; public static final String TABLE_NAME = "DBNode"; MyMetaData() { super( OBJECT_NAME, TABLE_NAME, // new AttributeAccessorKeySet( CD_ID ), // CD_ID, // CD_DateShipped, // CD_Description, // CD_Name, // CD_RecordVersion, // CD_SnagColumn, // CD_Parent, // CD_DBNodeSetForParent ); setIndexes( new Index( "DBNodeIDX1", null, true, CD_Name ) ); } public Class getPOclass() { return DBNode.class; } public DBNode createNew( Transaction pTransaction ) { return new DBNode( pTransaction ); } public DBNode createPOfromFinder() { return new DBNode( CONSTRUCTION_CONTROL ); } public String getRecordVersionAttributeName() { return CD_RecordVersion.getName(); } public String getSnagAttributeName() { return CD_SnagColumn.getName(); } public String getDisplayValueFormat() { return "${Name}"; } } } |
Commits for litesoft/trunk/Java/core/Server/tests/org/litesoft/or/DBNodePO.java
Revision | Author | Commited | Message |
---|---|---|---|
947 Diff | GeorgeS | Fri 06 Jun, 2014 23:36:56 +0000 | Correct Spelling of package! |
151 Diff | GeorgeS | Thu 17 Mar, 2011 04:16:22 +0000 | |
49 Diff | GeorgeS | Mon 12 Apr, 2010 02:59:10 +0000 | License Text |
21 Diff | GeorgeS | Tue 23 Feb, 2010 21:11:25 +0000 | |
2 | GeorgeS | Sun 07 Feb, 2010 12:50:58 +0000 |