public Result < FutureDAO . Data > create ( AuthzTrans trans , FutureDAO . Data data , String id ) { // If ID is not set (typical), create one. if ( data . id == null ) { StringBuilder sb = new StringBuilder ( trans . user ( ) ) ; sb . append ( data . target ) ; sb . append ( System . currentTimeMillis ( ) ) ; data . id = UUID . nameUUIDFromBytes ( sb . toString ( ) . getBytes ( ) ) ; } Result < ResultSet > rs = createPS . exec ( trans , C_TEXT , data ) ; if ( rs . notOK ( ) ) { return Result . err ( rs ) ; } wasModified ( trans , CRUD . create , data , null , id ) ; return Result . ok ( data ) ; }
Override create to add secondary ID to Subject in History and create Data . ID if it is null