public static AbstractCI < ? > getCI ( final ICIPrintStmt _stmt ) throws CacheReloadException { AbstractCI < ? > ret = null ; switch ( _stmt . getCINature ( ) ) { case TYPE : final Type type ; if ( UUIDUtil . isUUID ( _stmt . getCI ( ) ) ) { type = Type . get ( UUID . fromString ( _stmt . getCI ( ) ) ) ; } else { type = Type . get ( _stmt . getCI ( ) ) ; } if ( type != null ) { final org . efaps . json . ci . Type jsonType = new org . efaps . json . ci . Type ( ) . setName ( type . getName ( ) ) . setUUID ( type . getUUID ( ) ) . setId ( type . getId ( ) ) ; for ( final Attribute attr : type . getAttributes ( ) . values ( ) ) { final AttributeType attrType = new AttributeType ( ) . setName ( attr . getAttributeType ( ) . getName ( ) ) ; switch ( DMAttributeType . fromValue ( attr . getAttributeType ( ) . getName ( ) ) ) { case LINK : case LINK_WITH_RANGES : case STATUS : if ( attr . hasLink ( ) ) { attrType . setInfo ( attr . getLink ( ) . getName ( ) + ", " + attr . getLink ( ) . getUUID ( ) ) ; } break ; default : break ; } jsonType . addAttribute ( new org . efaps . json . ci . Attribute ( ) . setName ( attr . getName ( ) ) . setType ( attrType ) ) ; } ret = jsonType ; } break ; default : break ; } return ret ; }
Gets the ci .