/** * {@inheritDoc} */ @Override public boolean isAutoIncrement(int column) throws SQLException { ColumnDescriptor desc = getDescriptor(column); if (desc.isSetDescFlags()) { short flags = desc.getDescFlags(); return ((flags & gfxdConstants.COLUMN_AUTOINC) != 0); } else { return false; } }
/** * {@inheritDoc} */ @Override public int isNullable(int column) throws SQLException { ColumnDescriptor desc = getDescriptor(column); if (desc.isSetDescFlags()) { short flags = desc.getDescFlags(); if ((flags & gfxdConstants.COLUMN_NULLABLE) != 0) { return columnNullable; } else if ((flags & gfxdConstants.COLUMN_NONULLS) != 0) { return columnNoNulls; } } return columnNullableUnknown; }
/** * {@inheritDoc} */ @Override public int isNullable(int param) throws SQLException { ColumnDescriptor desc = getDescriptor(param); if (desc.isSetDescFlags()) { short flags = desc.getDescFlags(); if ((flags & gfxdConstants.COLUMN_NULLABLE) != 0) { return parameterNullable; } else if ((flags & gfxdConstants.COLUMN_NONULLS) != 0) { return parameterNoNulls; } } return parameterNullableUnknown; }
/** * {@inheritDoc} */ @Override public boolean isDefinitelyWritable(int column) throws SQLException { ColumnDescriptor desc = getDescriptor(column); if (desc.isSetDescFlags()) { short flags = getDescriptor(column).getDescFlags(); return ((flags & gfxdConstants.COLUMN_DEFINITELY_UPDATABLE) != 0); } else { return false; } }
/** * {@inheritDoc} */ @Override public boolean isWritable(int column) throws SQLException { ColumnDescriptor desc = getDescriptor(column); if (desc.isSetDescFlags()) { short flags = getDescriptor(column).getDescFlags(); return ((flags & gfxdConstants.COLUMN_UPDATABLE) != 0) || ((flags & gfxdConstants.COLUMN_DEFINITELY_UPDATABLE) != 0); } else { return false; } }
/** * {@inheritDoc} */ @Override public boolean isReadOnly(int column) throws SQLException { ColumnDescriptor desc = getDescriptor(column); if (desc.isSetDescFlags()) { short flags = getDescriptor(column).getDescFlags(); return ((flags & gfxdConstants.COLUMN_UPDATABLE) == 0) && ((flags & gfxdConstants.COLUMN_DEFINITELY_UPDATABLE) == 0); } else { return true; } }
lastComparison = Boolean.valueOf(isSetDescFlags()).compareTo(other.isSetDescFlags()); if (lastComparison != 0) { return lastComparison; if (isSetDescFlags()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.descFlags, other.descFlags); if (lastComparison != 0) {
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TYPE: return isSetType(); case DESC_FLAGS: return isSetDescFlags(); case PRECISION: return isSetPrecision(); case SCALE: return isSetScale(); case NAME: return isSetName(); case FULL_TABLE_NAME: return isSetFullTableName(); case UDT_TYPE_AND_CLASS_NAME: return isSetUdtTypeAndClassName(); } throw new IllegalStateException(); }
if (!struct.isSetDescFlags()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'descFlags' was not found in serialized data! Struct: " + toString());