public synchronized < S extends Storable > Trigger < S > getSupportTrigger ( Class < S > type , int blockSize ) { Object key = KeyFactory . createKey ( new Object [ ] { type , blockSize } ) ; Trigger < S > trigger = ( mTriggers == null ) ? null : ( Trigger < S > ) mTriggers . get ( key ) ; if ( trigger == null ) { StorableInfo < S > info = StorableIntrospector . examine ( type ) ; List < LobProperty < ? > > lobProperties = null ; for ( StorableProperty < ? extends S > prop : info . getAllProperties ( ) . values ( ) ) { if ( Blob . class . isAssignableFrom ( prop . getType ( ) ) ) { if ( lobProperties == null ) { lobProperties = new ArrayList < LobProperty < ? > > ( ) ; } lobProperties . add ( new BlobProperty ( this , prop . getName ( ) ) ) ; } else if ( Clob . class . isAssignableFrom ( prop . getType ( ) ) ) { if ( lobProperties == null ) { lobProperties = new ArrayList < LobProperty < ? > > ( ) ; } lobProperties . add ( new ClobProperty ( this , prop . getName ( ) ) ) ; } } if ( lobProperties != null ) { trigger = new LobEngineTrigger < S > ( this , type , blockSize , lobProperties ) ; } if ( mTriggers == null ) { mTriggers = SoftValuedCache . newCache ( 7 ) ; } mTriggers . put ( key , trigger ) ; } return trigger ; }
Returns a Trigger for binding to this LobEngine . Storage implementations which use LobEngine must install this Trigger . Trigger instances are cached so subsequent calls for the same trigger return the same instance .