public Long getObjectLong(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; return (ndbRecAttr.isNULL() == 1) ? null : Utility.getLong(storeColumn, ndbRecAttr.int64_value()); }
public byte[] getBytes(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; if (ndbRecAttr.isNULL() == 1) return null; int prefixLength = storeColumn.getPrefixLength(); int actualLength = lengths[index]; int offset = offsets[index]; switch (prefixLength) { case 0: break; case 1: actualLength = (byteBuffer.get(offset) + 256) % 256; offset += 1; break; case 2: actualLength = (byteBuffer.get(offset) + 256) % 256; int length2 = (byteBuffer.get(offset + 1) + 256) % 256; actualLength += 256 * length2; offset += 2; break; default: throw new ClusterJFatalInternalException( local.message("ERR_Invalid_Prefix_Length", prefixLength)); } byteBuffer.position(offset); byte[] result = new byte[actualLength]; byteBuffer.get(result); return result; }
public String getString(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; if (ndbRecAttr.isNULL() == 1) return null; int prefixLength = storeColumn.getPrefixLength(); int actualLength; int offset = offsets[index]; byteBuffer.limit(byteBuffer.capacity()); switch (prefixLength) { case 0: actualLength = lengths[index]; break; case 1: actualLength = (byteBuffer.get(offset) + 256) % 256; offset += 1; break; case 2: actualLength = (byteBuffer.get(offset) + 256) % 256; int length2 = (byteBuffer.get(offset + 1) + 256) % 256; actualLength += 256 * length2; offset += 2; break; default: throw new ClusterJFatalInternalException( local.message("ERR_Invalid_Prefix_Length", prefixLength)); } byteBuffer.position(offset); byteBuffer.limit(offset + actualLength); String result = Utility.decode(byteBuffer, storeColumn.getCharsetNumber(), bufferManager); byteBuffer.clear(); return result; }
public Boolean getObjectBoolean(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; if (ndbRecAttr.isNULL() == 1) { return null; } else { byte value = ndbRecAttr.int8_value(); Boolean result = (Boolean.valueOf((value & 0x01) == 0x01)); return result; } }
public Double getObjectDouble(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; return (ndbRecAttr.isNULL() == 1) ? null : getDouble(storeColumn); }
public Float getObjectFloat(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; return (ndbRecAttr.isNULL() == 1) ? null : getFloat(storeColumn); }
public Integer getObjectInteger(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; return (ndbRecAttr.isNULL() == 1) ? null : Utility.getInt(storeColumn, ndbRecAttr); }
public long getLong(Column storeColumn) { int index = storeColumn.getColumnId(); NdbRecAttr ndbRecAttr = ndbRecAttrs[index]; return Utility.getLong(storeColumn, ndbRecAttr.int64_value()); }