protected MixinInfo readMixins ( String cid ) throws SQLException , IllegalNameException { ResultSet mtrs = findPropertyByName ( cid , Constants . JCR_MIXINTYPES . getAsString ( ) ) ; try { List < InternalQName > mts = null ; boolean owneable = false ; boolean privilegeable = false ; if ( mtrs . next ( ) ) { mts = new ArrayList < InternalQName > ( ) ; do { byte [ ] mxnb = mtrs . getBytes ( COLUMN_VDATA ) ; if ( mxnb != null ) { InternalQName mxn = InternalQName . parse ( new String ( mxnb ) ) ; mts . add ( mxn ) ; if ( ! privilegeable && Constants . EXO_PRIVILEGEABLE . equals ( mxn ) ) { privilegeable = true ; } else if ( ! owneable && Constants . EXO_OWNEABLE . equals ( mxn ) ) { owneable = true ; } } // else, if SQL NULL - skip it } while ( mtrs . next ( ) ) ; } return new MixinInfo ( mts , owneable , privilegeable ) ; } finally { try { mtrs . close ( ) ; } catch ( SQLException e ) { LOG . error ( "Can't close the ResultSet: " + e . getMessage ( ) ) ; } } }
Read mixins from database .