kamaci commented on a change in pull request #221: URL: https://github.com/apache/gora/pull/221#discussion_r632667177
########## File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBKey.java ########## @@ -0,0 +1,386 @@ +/** + *Licensed to the Apache Software Foundation (ASF) under one + *or more contributor license agreements. See the NOTICE file + *distributed with this work for additional information + *regarding copyright ownership. The ASF licenses this file + *to you under the Apache License, Version 2.0 (the" + *License"); you may not use this file except in compliance + *with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *Unless required by applicable law or agreed to in writing, software + *distributed under the License is distributed on an "AS IS" BASIS, + *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + *See the License for the specific language governing permissions and + *limitations under the License. + */ +package org.apache.gora.scylladb.example.generated.AvroSerialization; + +/** This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys. */ +public class ScyllaDBKey extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent { + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBKey\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys.\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0}],\"default\":null}"); + private static final long serialVersionUID = 232044203208115437L; + /** Enum containing all data bean's fields. */ + public static enum Field { + URL(0, "url"), + TIMESTAMP(1, "timestamp"), + ; + /** + * Field's index. + */ + private int index; + + /** + * Field's name. + */ + private String name; + + /** + * Field's constructor + * @param index field's index. + * @param name field's name. + */ + Field(int index, String name) {this.index=index;this.name=name;} + + /** + * Gets field's index. + * @return int field's index. + */ + public int getIndex() {return index;} + + /** + * Gets field's name. + * @return String field's name. + */ + public String getName() {return name;} + + /** + * Gets field's attributes to string. + * @return String field's attributes to string. + */ + public String toString() {return name;} + }; + + public static final String[] _ALL_FIELDS = { + "url", + "timestamp", + }; + + /** + * Gets the total field count. + * @return int field count + */ + public int getFieldsCount() { + return ScyllaDBKey._ALL_FIELDS.length; + } + + private java.lang.CharSequence url; + private long timestamp; + public org.apache.avro.Schema getSchema() { return SCHEMA$; } + // Used by DatumWriter. Applications should not call. + public java.lang.Object get(int field$) { + switch (field$) { + case 0: return this.url; + case 1: return this.timestamp; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + // Used by DatumReader. Applications should not call. + @SuppressWarnings(value="unchecked") + public void put(int field$, java.lang.Object value) { + switch (field$) { + case 0: this.url = (java.lang.CharSequence)(value); break; + case 1: this.timestamp = (java.lang.Long)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + /** + * Gets the value of the 'url' field. + */ + public java.lang.CharSequence getUrl() { + return url; + } + + /** + * Sets the value of the 'url' field. + * @param value the value to set. + */ + public void setUrl(java.lang.CharSequence value) { + this.url = value; + setDirty(0); + } + + /** + * Checks the dirty status of the 'url' field. A field is dirty if it represents a change that has not yet been written to the database. + * @param value the value to set. + */ + public boolean isUrlDirty() { + return isDirty(0); + } + + /** + * Gets the value of the 'timestamp' field. + */ + public java.lang.Long getTimestamp() { + return timestamp; + } + + /** + * Sets the value of the 'timestamp' field. + * @param value the value to set. + */ + public void setTimestamp(java.lang.Long value) { + this.timestamp = value; + setDirty(1); + } + + /** + * Checks the dirty status of the 'timestamp' field. A field is dirty if it represents a change that has not yet been written to the database. + * @param value the value to set. + */ + public boolean isTimestampDirty() { + return isDirty(1); + } + + /** Creates a new ScyllaDBKey RecordBuilder */ + public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder() { + return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder(); + } + + /** Creates a new ScyllaDBKey RecordBuilder by copying an existing Builder */ + public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder other) { Review comment: Line length is too much. Please check all the PR. ########## File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBKey.java ########## @@ -0,0 +1,386 @@ +/** + *Licensed to the Apache Software Foundation (ASF) under one + *or more contributor license agreements. See the NOTICE file + *distributed with this work for additional information + *regarding copyright ownership. The ASF licenses this file + *to you under the Apache License, Version 2.0 (the" + *License"); you may not use this file except in compliance + *with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *Unless required by applicable law or agreed to in writing, software + *distributed under the License is distributed on an "AS IS" BASIS, + *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + *See the License for the specific language governing permissions and + *limitations under the License. + */ +package org.apache.gora.scylladb.example.generated.AvroSerialization; + +/** This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys. */ +public class ScyllaDBKey extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent { + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBKey\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys.\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0}],\"default\":null}"); + private static final long serialVersionUID = 232044203208115437L; + /** Enum containing all data bean's fields. */ + public static enum Field { + URL(0, "url"), + TIMESTAMP(1, "timestamp"), + ; + /** + * Field's index. + */ + private int index; + + /** + * Field's name. + */ + private String name; + + /** + * Field's constructor + * @param index field's index. + * @param name field's name. + */ + Field(int index, String name) {this.index=index;this.name=name;} + + /** + * Gets field's index. + * @return int field's index. + */ + public int getIndex() {return index;} + + /** + * Gets field's name. + * @return String field's name. + */ + public String getName() {return name;} + + /** + * Gets field's attributes to string. + * @return String field's attributes to string. + */ + public String toString() {return name;} + }; + + public static final String[] _ALL_FIELDS = { + "url", + "timestamp", + }; + + /** + * Gets the total field count. + * @return int field count + */ + public int getFieldsCount() { + return ScyllaDBKey._ALL_FIELDS.length; + } + + private java.lang.CharSequence url; + private long timestamp; + public org.apache.avro.Schema getSchema() { return SCHEMA$; } + // Used by DatumWriter. Applications should not call. + public java.lang.Object get(int field$) { + switch (field$) { + case 0: return this.url; + case 1: return this.timestamp; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + // Used by DatumReader. Applications should not call. + @SuppressWarnings(value="unchecked") + public void put(int field$, java.lang.Object value) { + switch (field$) { + case 0: this.url = (java.lang.CharSequence)(value); break; + case 1: this.timestamp = (java.lang.Long)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + /** + * Gets the value of the 'url' field. + */ + public java.lang.CharSequence getUrl() { + return url; + } + + /** + * Sets the value of the 'url' field. + * @param value the value to set. + */ + public void setUrl(java.lang.CharSequence value) { + this.url = value; + setDirty(0); + } + + /** + * Checks the dirty status of the 'url' field. A field is dirty if it represents a change that has not yet been written to the database. + * @param value the value to set. + */ + public boolean isUrlDirty() { + return isDirty(0); + } + + /** + * Gets the value of the 'timestamp' field. + */ + public java.lang.Long getTimestamp() { + return timestamp; + } + + /** + * Sets the value of the 'timestamp' field. + * @param value the value to set. + */ + public void setTimestamp(java.lang.Long value) { + this.timestamp = value; + setDirty(1); + } + + /** + * Checks the dirty status of the 'timestamp' field. A field is dirty if it represents a change that has not yet been written to the database. + * @param value the value to set. + */ + public boolean isTimestampDirty() { + return isDirty(1); + } + + /** Creates a new ScyllaDBKey RecordBuilder */ + public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder() { + return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder(); + } + + /** Creates a new ScyllaDBKey RecordBuilder by copying an existing Builder */ + public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder other) { + return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder(other); + } + + /** Creates a new ScyllaDBKey RecordBuilder by copying an existing ScyllaDBKey instance */ + public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey other) { Review comment: Line length is too much. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org