litesoft
@ 948
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 |
package org.litesoft.datt.server.pos; import org.litesoft.commonfoundation.typeutils.*; import org.litesoft.core.simpletypes.nonpublic.*; import org.litesoft.core.simpletypes.temporal.*; import org.litesoft.core.util.*; import org.litesoft.orsup.base.*; import org.litesoft.orsup.transact.*; public class StoryUpdate extends StoryUpdateGO { public StoryUpdate( Transaction pTransaction ) { super( pTransaction ); } public StoryUpdate( ConstructionControl pConstructionControl ) { super( pConstructionControl ); } public StoryUpdate( Transaction pTransaction, User pChanger ) { this( pTransaction ); setByWhom( pChanger ); } public StoryUpdate( Transaction pTransaction, User pChanger, String pMessage ) { this( pTransaction, pChanger ); setMessage( pMessage ); } @Override public int compareTo( PersistentObject pOther ) { if ( pOther instanceof StoryUpdate ) { StoryUpdate them = (StoryUpdate) pOther; return CompareSupport.compare( them.getCreated(), this.getCreated() ); } return getPersistentObjectURL().compareTo( pOther.getPersistentObjectURL() ); } public void toString( StringBuilder pSb ) { if ( pSb.length() != 0 ) { pSb.append( '\n' ); } pSb.append( TypeConverter.to_SimpleTimestamp( TimeRes.ToMIN, getCreated() ) ).append( " - " ).append( getByWhom() ).append( '\n' ); if ( Strings.isNotNullOrEmpty( getMessage() ) ) { pSb.append( " " ).append( getMessage() ).append( '\n' ); } for ( StoryChange zChange : getChanges() ) { pSb.append( " " ).append( zChange ).append( '\n' ); } } } |