@Override
    public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName,
            Object columnValue, Class entityClazz)
    {
        String childIdStr = (String) columnValue;
        StringBuffer sqlQuery = new StringBuffer();
        sqlQuery.append("SELECT ").append(pKeyName).append(" FROM ").append(getFromClause(schemaName, tableName))
                .append(" WHERE ").append(columnName).append("='").append(childIdStr).append("'");

        Session s = getSession();

        SQLQuery query = s.createSQLQuery(sqlQuery.toString());

        List<Object> primaryKeys = new ArrayList<Object>();

        primaryKeys = query.list();

        if (primaryKeys != null && !primaryKeys.isEmpty())
        {
            return primaryKeys.toArray(new Object[0]);
        }
        return null;
    }
@ Override public Object [ ] findIdsByColumn ( String schemaName , String tableName , String pKeyName , String columnName , Object columnValue , Class entityClazz ) { String childIdStr = ( String ) columnValue ; StringBuffer sqlQuery = new StringBuffer ( ) ; sqlQuery . append ( "SELECT " ) . append ( pKeyName ) . append ( " FROM " ) . append ( getFromClause ( schemaName , tableName ) ) . append ( " WHERE " ) . append ( columnName ) . append ( "='" ) . append ( childIdStr ) . append ( "'" ) ; Session s = getSession ( ) ; SQLQuery query = s . createSQLQuery ( sqlQuery . toString ( ) ) ; List < Object > primaryKeys = new ArrayList < Object > ( ) ; primaryKeys = query . list ( ) ; if ( primaryKeys != null && ! primaryKeys . isEmpty ( ) ) { return primaryKeys . toArray ( new Object [ 0 ] ) ; } return null ; }
/*
(non-Javadoc)

@see com.impetus.kundera.client.Client#findIdsByColumn(java.lang.String,
java.lang.String, java.lang.String, java.lang.Object, java.lang.Class)