@Override
    public void writeColumns(HTableInterface htable, Object rowKey, Map<String, Attribute> columns, Object entity,
            String columnFamilyName) throws IOException
    {
        Put p = new Put(HBaseUtils.getBytes(rowKey));

        boolean present = false;
        for (String columnName : columns.keySet())
        {
            Attribute column = columns.get(columnName);
            if (!column.isCollection() && !((SingularAttribute) column).isId())
            {
                String qualifier = columnName;
                try
                {
                    byte[] qualValInBytes = Bytes.toBytes(qualifier);
                    Object value = PropertyAccessorHelper.getObject(entity, (Field) column.getJavaMember());
                    if (value != null)
                    {
                        p.add(columnFamilyName.getBytes(), qualValInBytes, System.currentTimeMillis(),
                                HBaseUtils.getBytes(value));
                        present = true;
                    }
                }
                catch (PropertyAccessException e1)
                {
                    throw new IOException(e1);
                }
            }
        }
        if (present)
        {
            htable.put(p);
        }
    }
@ Override public void writeColumns ( HTableInterface htable , Object rowKey , Map < String , Attribute > columns , Object entity , String columnFamilyName ) throws IOException { Put p = new Put ( HBaseUtils . getBytes ( rowKey ) ) ; boolean present = false ; for ( String columnName : columns . keySet ( ) ) { Attribute column = columns . get ( columnName ) ; if ( ! column . isCollection ( ) && ! ( ( SingularAttribute ) column ) . isId ( ) ) { String qualifier = columnName ; try { byte [ ] qualValInBytes = Bytes . toBytes ( qualifier ) ; Object value = PropertyAccessorHelper . getObject ( entity , ( Field ) column . getJavaMember ( ) ) ; if ( value != null ) { p . add ( columnFamilyName . getBytes ( ) , qualValInBytes , System . currentTimeMillis ( ) , HBaseUtils . getBytes ( value ) ) ; present = true ; } } catch ( PropertyAccessException e1 ) { throw new IOException ( e1 ) ; } } } if ( present ) { htable . put ( p ) ; } }
/*
(non-Javadoc)

@see
com.impetus.client.hbase.Writer#writeColumns(org.apache.hadoop.hbase.
client.HTable, java.lang.Object, java.util.Set, java.lang.Object)