public ISchema deepCopy() { return new ISchema(this); }
public ISchema build() throws MetaException { if (schemaType == null || name == null) { throw new MetaException("You must provide a schemaType and name"); } ISchema iSchema = new ISchema(schemaType, name, catName, dbName, compatibility, validationLevel, canEvolve); if (schemaGroup != null) iSchema.setSchemaGroup(schemaGroup); if (description != null) iSchema.setDescription(description); return iSchema; } }
/** * Performs a deep copy on <i>other</i>. */ public AlterISchemaRequest(AlterISchemaRequest other) { if (other.isSetName()) { this.name = new ISchemaName(other.name); } if (other.isSetNewSchema()) { this.newSchema = new ISchema(other.newSchema); } }
case 3: // NEW_SCHEMA if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.newSchema = new ISchema(); struct.newSchema.read(iprot); struct.setNewSchemaIsSet(true);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, AlterISchemaRequest struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.name = new ISchemaName(); struct.name.read(iprot); struct.setNameIsSet(true); } if (incoming.get(1)) { struct.newSchema = new ISchema(); struct.newSchema.read(iprot); struct.setNewSchemaIsSet(true); } } }
private ISchema convertToISchema(MISchema mSchema) { if (mSchema == null) { return null; } ISchema schema = new ISchema(SchemaType.findByValue(mSchema.getSchemaType()), mSchema.getName(), mSchema.getDb().getCatalogName(), mSchema.getDb().getName(), SchemaCompatibility.findByValue(mSchema.getCompatibility()), SchemaValidation.findByValue(mSchema.getValidationLevel()), mSchema.getCanEvolve()); if (mSchema.getDescription() != null) { schema.setDescription(mSchema.getDescription()); } if (mSchema.getSchemaGroup() != null) { schema.setSchemaGroup(mSchema.getSchemaGroup()); } return schema; }
private ISchema convertToISchema(MISchema mSchema) { if (mSchema == null) { return null; } ISchema schema = new ISchema(SchemaType.findByValue(mSchema.getSchemaType()), mSchema.getName(), mSchema.getDb().getCatalogName(), mSchema.getDb().getName(), SchemaCompatibility.findByValue(mSchema.getCompatibility()), SchemaValidation.findByValue(mSchema.getValidationLevel()), mSchema.getCanEvolve()); if (mSchema.getDescription() != null) { schema.setDescription(mSchema.getDescription()); } if (mSchema.getSchemaGroup() != null) { schema.setSchemaGroup(mSchema.getSchemaGroup()); } return schema; }