public String [ ] getLocalColumns ( String modelName ) { List < String > columnList = new ArrayList < String > ( ) ; for ( int i = 0 ; i < this . hasOne . length ; i ++ ) { if ( modelName . equalsIgnoreCase ( this . hasOne [ i ] ) ) { columnList . add ( hasOneLocalColumn [ i ] ) ; } } for ( int j = 0 ; j < this . hasMany . length ; j ++ ) { if ( modelName . equalsIgnoreCase ( hasMany [ j ] ) ) { columnList . add ( hasManyLocalColumn [ j ] ) ; } } if ( columnList . size ( ) == 0 ) { return null ; } return columnList . toArray ( new String [ columnList . size ( ) ] ) ; }
get the foreign key column of this table definition from this refered table