<T>T onFind(Class<T> modelClass,long id,boolean isEager){
  List<T> dataList=query(modelClass,null,"id = ?",new String[]{String.valueOf(id)},null,null,null,null,getForeignKeyAssociations(modelClass.getName(),isEager));
  if (dataList.size() > 0) {
    return dataList.get(0);
  }
  return null;
}

< T > T onFind ( Class < T > modelClass , long id , boolean isEager ) { List < T > dataList = query ( modelClass , null , "id = ?" , new String [ ] { String . valueOf ( id ) } , null , null , null , null , getForeignKeyAssociations ( modelClass . getName ( ) , isEager ) ) ; if ( dataList . size ( ) > 0 ) { return dataList . get ( 0 ) ; } return null ; }
the open interface for other classes in crud package to query a record based on id . if the result set is empty , gives null back .
