private void flushJoinTableData ( ) { if ( applyFlush ( ) ) { for ( JoinTableData jtData : flushManager . getJoinTableData ( ) ) { if ( ! jtData . isProcessed ( ) ) { EntityMetadata m = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , jtData . getEntityClass ( ) ) ; Client client = getClient ( m ) ; if ( OPERATION . INSERT . equals ( jtData . getOperation ( ) ) ) { client . persistJoinTable ( jtData ) ; jtData . setProcessed ( true ) ; } else if ( OPERATION . DELETE . equals ( jtData . getOperation ( ) ) ) { for ( Object pk : jtData . getJoinTableRecords ( ) . keySet ( ) ) { client . deleteByColumn ( m . getSchema ( ) , jtData . getJoinTableName ( ) , jtData . getJoinColumnName ( ) , pk ) ; } jtData . setProcessed ( true ) ; } } } } }
On flushing join table data