litesoft
@ 860
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 |
package org.litesoft.initfrom.server.pos; import org.litesoft.bo.attributes.*; import org.litesoft.core.simpletypes.temporal.*; import org.litesoft.core.util.*; import org.litesoft.orsup.base.*; import org.litesoft.orsup.otherattributeaccessors.*; import org.litesoft.orsup.transact.*; public abstract class ReportGO<T extends Report> extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<T> implements HasAttributes { public static final String[] sValidOptionsReportType = // { // ReportNames.poReportType_Provider_Basic, // ReportNames.poReportType_Provider_Detailed, // ReportNames.poReportType_Medication_Tracking, // ReportNames.poReportType_Patient_Tracking, // ReportNames.poReportType_Patient_Entry, // ReportNames.poReportType_Inventory_Tracking, // ReportNames.poReportType_Inventory_Refill, // ReportNames.poReportType_Inventory_Histogram, // }; protected ReportGO( MetaDataForPO pMetaDataForPO, Transaction pTransaction ) { super( pMetaDataForPO, pTransaction ); } protected ReportGO( MetaDataForPO pMetaDataForPO, ConstructionControl pConstructionControlExpected, ConstructionControl pConstructionControlActual ) { super( pMetaDataForPO, pConstructionControlExpected, pConstructionControlActual ); } public static final AttributeAccessorSCD CD_OutputFile = new AttributeAccessor_OutputFile(); private String mOutputFile; /** * The path to the output file or image of the report */ public String getOutputFile() { return mOutputFile; } public void setOutputFile( String pOutputFile ) { verifyMutability( CD_OutputFile, mOutputFile, pOutputFile ); mOutputFile = pOutputFile; } private static class AttributeAccessor_OutputFile extends AttributeAccessorSCDsimplePersistedRegular<Report> { public AttributeAccessor_OutputFile() { super( "OutputFile", "OutputFile", false, _String.with( MaxLength.of( 40 ), // DisplayLength.of( 20 ) ) ); } @Override public Object getValueOnPO( Report pPO ) { return pPO.getOutputFile(); } @Override public void setValueOnPO( Report pPO, Object pValue ) { pPO.setOutputFile( to_String( pValue ) ); } } public static final AttributeAccessorSCD CD_ReportType = new AttributeAccessor_ReportType(); private String mReportType; public String getReportType() { return mReportType; } public void setReportType( String pReportType ) { verifyMutability( CD_ReportType, mReportType, pReportType ); mReportType = pReportType; } private static class AttributeAccessor_ReportType extends AttributeAccessorSCDsimplePersistedRegular<Report> { public AttributeAccessor_ReportType() { super( "ReportType", "ReportType", false, _ValidOptions.with( Options.of( sValidOptionsReportType ) ) ); } @Override public Object getValueOnPO( Report pPO ) { return pPO.getReportType(); } @Override public void setValueOnPO( Report pPO, Object pValue ) { pPO.setReportType( to_String( pValue ) ); } } public static final AttributeAccessorSCD CD_RunDate = new AttributeAccessor_RunDate(); final org.litesoft.orsup.lazyeval.LazyEvalSimpleDate mRunDate = new org.litesoft.orsup.lazyeval.LazyEvalSimpleDate(); public CalendarYMD getRunDate() { return mRunDate.getCalendarYMD(); } public void setRunDate( CalendarYMD pRunDate ) { verifyMutability( CD_RunDate, mRunDate.getCalendarYMD(), pRunDate ); mRunDate.setCalendarYMD( pRunDate ); } private static class AttributeAccessor_RunDate extends AttributeAccessorSCDsimplePersistedRegular<Report> { public AttributeAccessor_RunDate() { super( "RunDate", "RunDate", true, _SimpleDate ); } @Override public Object getValueOnPO( Report pPO ) { return pPO.getRunDate(); } @Override public void setValueOnPO( Report pPO, Object pValue ) { pPO.setRunDate( to_SimpleDate( pPO.mRunDate.getDateRes(), pValue ) ); } @Override public Object db_getValueOnPO( Report pPO ) { return pPO.mRunDate.getPersistFormSimpleDate(); } @Override public void db_setValueOnPO( Report pPO, Object pValue ) { pPO.mRunDate.setPersistFormSimpleDate( to_String( pValue ) ); } } static abstract class MyMetaData<T extends Report> extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<T> { MyMetaData( String pIdentifierName, String pTableName, AttributeAccessorKeySet pAttributeAccessorKeySet, AttributeAccessorSCD... pAccessorSCDs ) { this( null, pIdentifierName, pTableName, pAttributeAccessorKeySet, pAccessorSCDs ); } MyMetaData( AttributeAccessorSCD[] pAccessorSCDs, String pIdentifierName, String pTableName, AttributeAccessorKeySet pAttributeAccessorKeySet, AttributeAccessorSCD... pMoreAccessorSCDs ) { super( join( pAccessorSCDs, pMoreAccessorSCDs ), pIdentifierName, pTableName, pAttributeAccessorKeySet, // // Regular CD_OutputFile, /* .. */ CD_ReportType, /* .. */ CD_RunDate /* ...... Required */ ); } } } |