public CacheFileMetadataResult deepCopy() { return new CacheFileMetadataResult(this); }
public Object getFieldValue(_Fields field) { switch (field) { case IS_SUPPORTED: return isIsSupported(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof CacheFileMetadataResult) return this.equals((CacheFileMetadataResult)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case IS_SUPPORTED: if (value == null) { unsetIsSupported(); } else { setIsSupported((Boolean)value); } break; } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetIsSupported()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); } // check for sub-struct validity }
public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IS_SUPPORTED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isSupported = iprot.readBool(); struct.setIsSupportedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
public void setIsSupported(boolean isSupported) { this.isSupported = isSupported; setIsSupportedIsSet(true); }
/** 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 IS_SUPPORTED: return isSetIsSupported(); } throw new IllegalStateException(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public void clear() { setIsSupportedIsSet(false); this.isSupported = false; }
@Override public int compareTo(CacheFileMetadataResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); if (lastComparison != 0) { return lastComparison; } if (isSetIsSupported()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); if (lastComparison != 0) { return lastComparison; } } return 0; }
RawStore ms = getMS(); if (!ms.isFileMetadataSupported()) { return new CacheFileMetadataResult(false); return new CacheFileMetadataResult(true);
@Override public boolean cacheFileMetadata( String dbName, String tableName, String partName, boolean allParts) throws TException { CacheFileMetadataRequest req = new CacheFileMetadataRequest(); req.setDbName(dbName); req.setTblName(tableName); if (partName != null) { req.setPartName(partName); } else { req.setIsAllParts(allParts); } CacheFileMetadataResult result = client.cache_file_metadata(req); return result.isIsSupported(); }
public CacheFileMetadataResult( boolean isSupported) { this(); this.isSupported = isSupported; setIsSupportedIsSet(true); }
RawStore ms = getMS(); if (!ms.isFileMetadataSupported()) { return new CacheFileMetadataResult(false); return new CacheFileMetadataResult(true);
@Override public boolean cacheFileMetadata( String dbName, String tableName, String partName, boolean allParts) throws TException { CacheFileMetadataRequest req = new CacheFileMetadataRequest(); req.setDbName(dbName); req.setTblName(tableName); if (partName != null) { req.setPartName(partName); } else { req.setIsAllParts(allParts); } CacheFileMetadataResult result = client.cache_file_metadata(req); return result.isIsSupported(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.isSupported = iprot.readBool(); struct.setIsSupportedIsSet(true); } }