From c103f8951106f037b7e2b075c69610372d65aa4c Mon Sep 17 00:00:00 2001 From: Kevin Ratnasekera Date: Sat, 17 Sep 2016 01:13:47 +0530 Subject: [PATCH 1/4] GORA-495 fix --- .../velocity/org/apache/gora/compiler/templates/record.vm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm b/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm index 30d5e3d29..3235caa1d 100644 --- a/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm +++ b/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm @@ -354,6 +354,11 @@ public class ${this.mangle($schema.getName())}#if ($schema.isError()) extends or } + private static final org.apache.avro.io.DatumWriter + DATUM_WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$); + private static final org.apache.avro.io.DatumReader + DATUM_READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$); + /** * Writes AVRO data bean to output stream in the form of AVRO Binary encoding format. This will transform * AVRO data bean from its Java object form to it s serializable form. From f14dbd4be9f0ed0729816466db0a803b1c7598a3 Mon Sep 17 00:00:00 2001 From: Kevin Ratnasekera Date: Sat, 17 Sep 2016 03:57:30 +0530 Subject: [PATCH 2/4] adding recompiled data beans --- .../gora/examples/generated/Employee.java | 449 +++++++------- .../examples/generated/ImmutableFields.java | 175 +++--- .../gora/examples/generated/Metadata.java | 179 +++--- .../gora/examples/generated/TokenDatum.java | 113 ++-- .../apache/gora/examples/generated/V2.java | 111 ++-- .../gora/examples/generated/WebPage.java | 565 +++++++++--------- .../apache/gora/goraci/generated/CINode.java | 243 ++++---- .../apache/gora/goraci/generated/Flushed.java | 115 ++-- .../tutorial/log/generated/MetricDatum.java | 244 ++++---- .../gora/tutorial/log/generated/Pageview.java | 546 ++++++++--------- 10 files changed, 1375 insertions(+), 1365 deletions(-) diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java index cf3fe977c..fc0754ee6 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java @@ -1,20 +1,10 @@ /** - * 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 + * Autogenerated by Avro * - * 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. + * DO NOT EDIT DIRECTLY */ -package org.apache.gora.examples.generated; +package org.apache.gora.examples.generated; +@SuppressWarnings("all") public class Employee 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\":\"Employee\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"name\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"dateOfBirth\",\"type\":\"long\",\"default\":0},{\"name\":\"ssn\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"salary\",\"type\":\"int\",\"default\":0},{\"name\":\"boss\",\"type\":[\"null\",\"Employee\",\"string\"],\"default\":null},{\"name\":\"webpage\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"WebPage\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"content\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"parsedContent\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":{}},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"default\":{}},{\"name\":\"headers\",\"type\":[\"null\",{\"type\":\"map\",\"values\":[\"null\",\"string\"]}],\"default\":null},{\"name\":\"metadata\",\"type\":{\"type\":\"record\",\"name\":\"Metadata\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}}]},\"default\":null}]}],\"default\":null}],\"default\":null}"); private static final long serialVersionUID = -6468893522296148608L; @@ -64,12 +54,12 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "name", - "dateOfBirth", - "ssn", - "salary", - "boss", - "webpage", + "name", + "dateOfBirth", + "ssn", + "salary", + "boss", + "webpage", }; /** @@ -87,29 +77,30 @@ public int getFieldsCount() { private java.lang.Object boss; private org.apache.gora.examples.generated.WebPage webpage; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return name; - case 1: return dateOfBirth; - case 2: return ssn; - case 3: return salary; - case 4: return boss; - case 5: return webpage; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return name; + case 1: return dateOfBirth; + case 2: return ssn; + case 3: return salary; + case 4: return boss; + case 5: return webpage; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. + @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: name = (java.lang.CharSequence)(value); break; - case 1: dateOfBirth = (java.lang.Long)(value); break; - case 2: ssn = (java.lang.CharSequence)(value); break; - case 3: salary = (java.lang.Integer)(value); break; - case 4: boss = (java.lang.Object)(value); break; - case 5: webpage = (org.apache.gora.examples.generated.WebPage)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: name = (java.lang.CharSequence)(value); break; + case 1: dateOfBirth = (java.lang.Long)(value); break; + case 2: ssn = (java.lang.CharSequence)(value); break; + case 3: salary = (java.lang.Integer)(value); break; + case 4: boss = (java.lang.Object)(value); break; + case 5: webpage = (org.apache.gora.examples.generated.WebPage)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -128,7 +119,7 @@ public void setName(java.lang.CharSequence value) { this.name = value; setDirty(0); } - + /** * Checks the dirty status of the 'name' 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. @@ -152,7 +143,7 @@ public void setDateOfBirth(java.lang.Long value) { this.dateOfBirth = value; setDirty(1); } - + /** * Checks the dirty status of the 'dateOfBirth' 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. @@ -176,7 +167,7 @@ public void setSsn(java.lang.CharSequence value) { this.ssn = value; setDirty(2); } - + /** * Checks the dirty status of the 'ssn' 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. @@ -200,7 +191,7 @@ public void setSalary(java.lang.Integer value) { this.salary = value; setDirty(3); } - + /** * Checks the dirty status of the 'salary' 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. @@ -224,7 +215,7 @@ public void setBoss(java.lang.Object value) { this.boss = value; setDirty(4); } - + /** * Checks the dirty status of the 'boss' 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. @@ -248,7 +239,7 @@ public void setWebpage(org.apache.gora.examples.generated.WebPage value) { this.webpage = value; setDirty(5); } - + /** * Checks the dirty status of the 'webpage' 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. @@ -261,20 +252,19 @@ public boolean isWebpageDirty() { public static org.apache.gora.examples.generated.Employee.Builder newBuilder() { return new org.apache.gora.examples.generated.Employee.Builder(); } - + /** Creates a new Employee RecordBuilder by copying an existing Builder */ public static org.apache.gora.examples.generated.Employee.Builder newBuilder(org.apache.gora.examples.generated.Employee.Builder other) { return new org.apache.gora.examples.generated.Employee.Builder(other); } - + /** Creates a new Employee RecordBuilder by copying an existing Employee instance */ public static org.apache.gora.examples.generated.Employee.Builder newBuilder(org.apache.gora.examples.generated.Employee other) { return new org.apache.gora.examples.generated.Employee.Builder(other); } - - @SuppressWarnings("unused") + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -295,12 +285,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for Employee instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private java.lang.CharSequence name; private long dateOfBirth; @@ -313,15 +303,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.examples.generated.Employee.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.examples.generated.Employee.Builder other) { super(other); } - + /** Creates a Builder by copying an existing Employee instance */ private Builder(org.apache.gora.examples.generated.Employee other) { - super(org.apache.gora.examples.generated.Employee.SCHEMA$); + super(org.apache.gora.examples.generated.Employee.SCHEMA$); if (isValidValue(fields()[0], other.name)) { this.name = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; @@ -352,150 +342,150 @@ private Builder(org.apache.gora.examples.generated.Employee other) { public java.lang.CharSequence getName() { return name; } - + /** Sets the value of the 'name' field */ public org.apache.gora.examples.generated.Employee.Builder setName(java.lang.CharSequence value) { validate(fields()[0], value); this.name = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'name' field has been set */ public boolean hasName() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'name' field */ public org.apache.gora.examples.generated.Employee.Builder clearName() { name = null; fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'dateOfBirth' field */ public java.lang.Long getDateOfBirth() { return dateOfBirth; } - + /** Sets the value of the 'dateOfBirth' field */ public org.apache.gora.examples.generated.Employee.Builder setDateOfBirth(long value) { validate(fields()[1], value); this.dateOfBirth = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'dateOfBirth' field has been set */ public boolean hasDateOfBirth() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'dateOfBirth' field */ public org.apache.gora.examples.generated.Employee.Builder clearDateOfBirth() { fieldSetFlags()[1] = false; return this; } - + /** Gets the value of the 'ssn' field */ public java.lang.CharSequence getSsn() { return ssn; } - + /** Sets the value of the 'ssn' field */ public org.apache.gora.examples.generated.Employee.Builder setSsn(java.lang.CharSequence value) { validate(fields()[2], value); this.ssn = value; fieldSetFlags()[2] = true; - return this; + return this; } - + /** Checks whether the 'ssn' field has been set */ public boolean hasSsn() { return fieldSetFlags()[2]; } - + /** Clears the value of the 'ssn' field */ public org.apache.gora.examples.generated.Employee.Builder clearSsn() { ssn = null; fieldSetFlags()[2] = false; return this; } - + /** Gets the value of the 'salary' field */ public java.lang.Integer getSalary() { return salary; } - + /** Sets the value of the 'salary' field */ public org.apache.gora.examples.generated.Employee.Builder setSalary(int value) { validate(fields()[3], value); this.salary = value; fieldSetFlags()[3] = true; - return this; + return this; } - + /** Checks whether the 'salary' field has been set */ public boolean hasSalary() { return fieldSetFlags()[3]; } - + /** Clears the value of the 'salary' field */ public org.apache.gora.examples.generated.Employee.Builder clearSalary() { fieldSetFlags()[3] = false; return this; } - + /** Gets the value of the 'boss' field */ public java.lang.Object getBoss() { return boss; } - + /** Sets the value of the 'boss' field */ public org.apache.gora.examples.generated.Employee.Builder setBoss(java.lang.Object value) { validate(fields()[4], value); this.boss = value; fieldSetFlags()[4] = true; - return this; + return this; } - + /** Checks whether the 'boss' field has been set */ public boolean hasBoss() { return fieldSetFlags()[4]; } - + /** Clears the value of the 'boss' field */ public org.apache.gora.examples.generated.Employee.Builder clearBoss() { boss = null; fieldSetFlags()[4] = false; return this; } - + /** Gets the value of the 'webpage' field */ public org.apache.gora.examples.generated.WebPage getWebpage() { return webpage; } - + /** Sets the value of the 'webpage' field */ public org.apache.gora.examples.generated.Employee.Builder setWebpage(org.apache.gora.examples.generated.WebPage value) { validate(fields()[5], value); this.webpage = value; fieldSetFlags()[5] = true; - return this; + return this; } - + /** Checks whether the 'webpage' field has been set */ public boolean hasWebpage() { return fieldSetFlags()[5]; } - + /** Clears the value of the 'webpage' field */ public org.apache.gora.examples.generated.Employee.Builder clearWebpage() { webpage = null; fieldSetFlags()[5] = false; return this; } - + @Override public Employee build() { try { @@ -512,9 +502,9 @@ public Employee build() { } } } - + public Employee.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public Employee newInstance(){ @@ -522,150 +512,150 @@ public Employee newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends Employee implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'name' field. - */ - public java.lang.CharSequence getName() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'name' field. - * @param value the value to set. - */ - public void setName(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'name' 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 isNameDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'dateOfBirth' field. - */ - public java.lang.Long getDateOfBirth() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'dateOfBirth' field. - * @param value the value to set. - */ - public void setDateOfBirth(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'dateOfBirth' 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 isDateOfBirthDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'ssn' field. - */ - public java.lang.CharSequence getSsn() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'ssn' field. - * @param value the value to set. - */ - public void setSsn(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'ssn' 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 isSsnDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'salary' field. - */ - public java.lang.Integer getSalary() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'salary' field. - * @param value the value to set. - */ - public void setSalary(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'salary' 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 isSalaryDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'boss' field. - */ - public java.lang.Object getBoss() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'boss' field. - * @param value the value to set. - */ - public void setBoss(java.lang.Object value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'boss' 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 isBossDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'webpage' field. - */ - public org.apache.gora.examples.generated.WebPage getWebpage() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'webpage' field. - * @param value the value to set. - */ - public void setWebpage(org.apache.gora.examples.generated.WebPage value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'webpage' 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 isWebpageDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'name' field. + */ + public java.lang.CharSequence getName() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'name' field. + * @param value the value to set. + */ + public void setName(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'name' 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 isNameDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'dateOfBirth' field. + */ + public java.lang.Long getDateOfBirth() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'dateOfBirth' field. + * @param value the value to set. + */ + public void setDateOfBirth(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'dateOfBirth' 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 isDateOfBirthDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'ssn' field. + */ + public java.lang.CharSequence getSsn() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'ssn' field. + * @param value the value to set. + */ + public void setSsn(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'ssn' 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 isSsnDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'salary' field. + */ + public java.lang.Integer getSalary() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'salary' field. + * @param value the value to set. + */ + public void setSalary(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'salary' 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 isSalaryDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'boss' field. + */ + public java.lang.Object getBoss() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'boss' field. + * @param value the value to set. + */ + public void setBoss(java.lang.Object value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'boss' 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 isBossDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'webpage' field. + */ + public org.apache.gora.examples.generated.WebPage getWebpage() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'webpage' field. + * @param value the value to set. + */ + public void setWebpage(org.apache.gora.examples.generated.WebPage value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'webpage' 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 isWebpageDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -704,6 +694,5 @@ public void readExternal(java.io.ObjectInput in) .directBinaryDecoder((java.io.InputStream) in, null)); } - -} +} diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java index f885a588e..a006929d6 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.gora.examples.generated; +package org.apache.gora.examples.generated; @SuppressWarnings("all") /** Record with only immutable or dirtyable fields, used for testing */ public class ImmutableFields 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\":\"ImmutableFields\",\"namespace\":\"org.apache.gora.examples.generated\",\"doc\":\"Record with only immutable or dirtyable fields, used for testing\",\"fields\":[{\"name\":\"v1\",\"type\":\"int\",\"default\":0},{\"name\":\"v2\",\"type\":[{\"type\":\"record\",\"name\":\"V2\",\"fields\":[{\"name\":\"v3\",\"type\":\"int\",\"default\":0}]},\"null\"],\"default\":null}]}"); - private static final long serialVersionUID = -6468893522296148698L; + private static final long serialVersionUID = -7621464515167921131L; /** Enum containing all data bean's fields. */ public static enum Field { V1(0, "v1"), @@ -62,8 +62,8 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "v1", - "v2", + "v1", + "v2", }; /** @@ -77,22 +77,22 @@ public int getFieldsCount() { private int v1; private org.apache.gora.examples.generated.V2 v2; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return v1; - case 1: return v2; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return v1; + case 1: return v2; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: v1 = (java.lang.Integer)(value); break; - case 1: v2 = (org.apache.gora.examples.generated.V2)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: v1 = (java.lang.Integer)(value); break; + case 1: v2 = (org.apache.gora.examples.generated.V2)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -111,7 +111,7 @@ public void setV1(java.lang.Integer value) { this.v1 = value; setDirty(0); } - + /** * Checks the dirty status of the 'v1' 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. @@ -135,7 +135,7 @@ public void setV2(org.apache.gora.examples.generated.V2 value) { this.v2 = value; setDirty(1); } - + /** * Checks the dirty status of the 'v2' 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. @@ -148,19 +148,19 @@ public boolean isV2Dirty() { public static org.apache.gora.examples.generated.ImmutableFields.Builder newBuilder() { return new org.apache.gora.examples.generated.ImmutableFields.Builder(); } - + /** Creates a new ImmutableFields RecordBuilder by copying an existing Builder */ public static org.apache.gora.examples.generated.ImmutableFields.Builder newBuilder(org.apache.gora.examples.generated.ImmutableFields.Builder other) { return new org.apache.gora.examples.generated.ImmutableFields.Builder(other); } - + /** Creates a new ImmutableFields RecordBuilder by copying an existing ImmutableFields instance */ public static org.apache.gora.examples.generated.ImmutableFields.Builder newBuilder(org.apache.gora.examples.generated.ImmutableFields other) { return new org.apache.gora.examples.generated.ImmutableFields.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -181,12 +181,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for ImmutableFields instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private int v1; private org.apache.gora.examples.generated.V2 v2; @@ -195,15 +195,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.examples.generated.ImmutableFields.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.examples.generated.ImmutableFields.Builder other) { super(other); } - + /** Creates a Builder by copying an existing ImmutableFields instance */ private Builder(org.apache.gora.examples.generated.ImmutableFields other) { - super(org.apache.gora.examples.generated.ImmutableFields.SCHEMA$); + super(org.apache.gora.examples.generated.ImmutableFields.SCHEMA$); if (isValidValue(fields()[0], other.v1)) { this.v1 = (java.lang.Integer) data().deepCopy(fields()[0].schema(), other.v1); fieldSetFlags()[0] = true; @@ -218,51 +218,51 @@ private Builder(org.apache.gora.examples.generated.ImmutableFields other) { public java.lang.Integer getV1() { return v1; } - + /** Sets the value of the 'v1' field */ public org.apache.gora.examples.generated.ImmutableFields.Builder setV1(int value) { validate(fields()[0], value); this.v1 = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'v1' field has been set */ public boolean hasV1() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'v1' field */ public org.apache.gora.examples.generated.ImmutableFields.Builder clearV1() { fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'v2' field */ public org.apache.gora.examples.generated.V2 getV2() { return v2; } - + /** Sets the value of the 'v2' field */ public org.apache.gora.examples.generated.ImmutableFields.Builder setV2(org.apache.gora.examples.generated.V2 value) { validate(fields()[1], value); this.v2 = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'v2' field has been set */ public boolean hasV2() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'v2' field */ public org.apache.gora.examples.generated.ImmutableFields.Builder clearV2() { v2 = null; fieldSetFlags()[1] = false; return this; } - + @Override public ImmutableFields build() { try { @@ -275,9 +275,9 @@ public ImmutableFields build() { } } } - + public ImmutableFields.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public ImmutableFields newInstance(){ @@ -285,58 +285,58 @@ public ImmutableFields newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends ImmutableFields implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'v1' field. - */ - public java.lang.Integer getV1() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'v1' field. - * @param value the value to set. - */ - public void setV1(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'v1' 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 isV1Dirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'v2' field. - */ - public org.apache.gora.examples.generated.V2 getV2() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'v2' field. - * @param value the value to set. - */ - public void setV2(org.apache.gora.examples.generated.V2 value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'v2' 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 isV2Dirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'v1' field. + */ + public java.lang.Integer getV1() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'v1' field. + * @param value the value to set. + */ + public void setV1(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'v1' 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 isV1Dirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'v2' field. + */ + public org.apache.gora.examples.generated.V2 getV2() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'v2' field. + * @param value the value to set. + */ + public void setV2(org.apache.gora.examples.generated.V2 value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'v2' 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 isV2Dirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -377,4 +377,3 @@ public void readExternal(java.io.ObjectInput in) } } - diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java index a603c45ba..d332693f1 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java @@ -1,13 +1,13 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ -package org.apache.gora.examples.generated; +package org.apache.gora.examples.generated; @SuppressWarnings("all") public class Metadata 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\":\"Metadata\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":null}]}"); - private static final long serialVersionUID = -6468893522296178608L; + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Metadata\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}}]}"); + private static final long serialVersionUID = -7097391446015721734L; /** Enum containing all data bean's fields. */ public static enum Field { VERSION(0, "version"), @@ -50,8 +50,8 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "version", - "data", + "version", + "data", }; /** @@ -65,22 +65,22 @@ public int getFieldsCount() { private int version; private java.util.Map data; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return version; - case 1: return data; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return version; + case 1: return data; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: version = (java.lang.Integer)(value); break; - case 1: data = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: version = (java.lang.Integer)(value); break; + case 1: data = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -99,7 +99,7 @@ public void setVersion(java.lang.Integer value) { this.version = value; setDirty(0); } - + /** * Checks the dirty status of the 'version' 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. @@ -123,7 +123,7 @@ public void setData(java.util.Map this.data = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper(value); setDirty(1); } - + /** * Checks the dirty status of the 'data' 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. @@ -136,19 +136,19 @@ public boolean isDataDirty() { public static org.apache.gora.examples.generated.Metadata.Builder newBuilder() { return new org.apache.gora.examples.generated.Metadata.Builder(); } - + /** Creates a new Metadata RecordBuilder by copying an existing Builder */ public static org.apache.gora.examples.generated.Metadata.Builder newBuilder(org.apache.gora.examples.generated.Metadata.Builder other) { return new org.apache.gora.examples.generated.Metadata.Builder(other); } - + /** Creates a new Metadata RecordBuilder by copying an existing Metadata instance */ public static org.apache.gora.examples.generated.Metadata.Builder newBuilder(org.apache.gora.examples.generated.Metadata other) { return new org.apache.gora.examples.generated.Metadata.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -169,12 +169,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for Metadata instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private int version; private java.util.Map data; @@ -183,15 +183,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.examples.generated.Metadata.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.examples.generated.Metadata.Builder other) { super(other); } - + /** Creates a Builder by copying an existing Metadata instance */ private Builder(org.apache.gora.examples.generated.Metadata other) { - super(org.apache.gora.examples.generated.Metadata.SCHEMA$); + super(org.apache.gora.examples.generated.Metadata.SCHEMA$); if (isValidValue(fields()[0], other.version)) { this.version = (java.lang.Integer) data().deepCopy(fields()[0].schema(), other.version); fieldSetFlags()[0] = true; @@ -206,51 +206,51 @@ private Builder(org.apache.gora.examples.generated.Metadata other) { public java.lang.Integer getVersion() { return version; } - + /** Sets the value of the 'version' field */ public org.apache.gora.examples.generated.Metadata.Builder setVersion(int value) { validate(fields()[0], value); this.version = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'version' field has been set */ public boolean hasVersion() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'version' field */ public org.apache.gora.examples.generated.Metadata.Builder clearVersion() { fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'data' field */ public java.util.Map getData() { return data; } - + /** Sets the value of the 'data' field */ public org.apache.gora.examples.generated.Metadata.Builder setData(java.util.Map value) { validate(fields()[1], value); this.data = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'data' field has been set */ public boolean hasData() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'data' field */ public org.apache.gora.examples.generated.Metadata.Builder clearData() { data = null; fieldSetFlags()[1] = false; return this; } - + @Override public Metadata build() { try { @@ -263,9 +263,9 @@ public Metadata build() { } } } - + public Metadata.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public Metadata newInstance(){ @@ -273,58 +273,58 @@ public Metadata newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends Metadata implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'version' field. - */ - public java.lang.Integer getVersion() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'version' field. - * @param value the value to set. - */ - public void setVersion(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'version' 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 isVersionDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'data' field. - */ - public java.util.Map getData() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'data' field. - * @param value the value to set. - */ - public void setData(java.util.Map value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'data' 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 isDataDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'version' field. + */ + public java.lang.Integer getVersion() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'version' field. + * @param value the value to set. + */ + public void setVersion(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'version' 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 isVersionDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'data' field. + */ + public java.util.Map getData() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'data' field. + * @param value the value to set. + */ + public void setData(java.util.Map value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'data' 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 isDataDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -365,4 +365,3 @@ public void readExternal(java.io.ObjectInput in) } } - diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java index 7b09d13c3..9133346ba 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java @@ -14,11 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.gora.examples.generated; +package org.apache.gora.examples.generated; @SuppressWarnings("all") public class TokenDatum 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\":\"TokenDatum\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"count\",\"type\":\"int\",\"default\":0}]}"); - private static final long serialVersionUID = -6468894522296148608L; + private static final long serialVersionUID = -4481652577902636424L; /** Enum containing all data bean's fields. */ public static enum Field { COUNT(0, "count"), @@ -60,7 +60,7 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "count", + "count", }; /** @@ -73,20 +73,20 @@ public int getFieldsCount() { private int count; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return count; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return count; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: count = (java.lang.Integer)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: count = (java.lang.Integer)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -105,7 +105,7 @@ public void setCount(java.lang.Integer value) { this.count = value; setDirty(0); } - + /** * Checks the dirty status of the 'count' 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. @@ -118,19 +118,19 @@ public boolean isCountDirty() { public static org.apache.gora.examples.generated.TokenDatum.Builder newBuilder() { return new org.apache.gora.examples.generated.TokenDatum.Builder(); } - + /** Creates a new TokenDatum RecordBuilder by copying an existing Builder */ public static org.apache.gora.examples.generated.TokenDatum.Builder newBuilder(org.apache.gora.examples.generated.TokenDatum.Builder other) { return new org.apache.gora.examples.generated.TokenDatum.Builder(other); } - + /** Creates a new TokenDatum RecordBuilder by copying an existing TokenDatum instance */ public static org.apache.gora.examples.generated.TokenDatum.Builder newBuilder(org.apache.gora.examples.generated.TokenDatum other) { return new org.apache.gora.examples.generated.TokenDatum.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -151,12 +151,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for TokenDatum instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private int count; @@ -164,15 +164,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.examples.generated.TokenDatum.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.examples.generated.TokenDatum.Builder other) { super(other); } - + /** Creates a Builder by copying an existing TokenDatum instance */ private Builder(org.apache.gora.examples.generated.TokenDatum other) { - super(org.apache.gora.examples.generated.TokenDatum.SCHEMA$); + super(org.apache.gora.examples.generated.TokenDatum.SCHEMA$); if (isValidValue(fields()[0], other.count)) { this.count = (java.lang.Integer) data().deepCopy(fields()[0].schema(), other.count); fieldSetFlags()[0] = true; @@ -183,26 +183,26 @@ private Builder(org.apache.gora.examples.generated.TokenDatum other) { public java.lang.Integer getCount() { return count; } - + /** Sets the value of the 'count' field */ public org.apache.gora.examples.generated.TokenDatum.Builder setCount(int value) { validate(fields()[0], value); this.count = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'count' field has been set */ public boolean hasCount() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'count' field */ public org.apache.gora.examples.generated.TokenDatum.Builder clearCount() { fieldSetFlags()[0] = false; return this; } - + @Override public TokenDatum build() { try { @@ -214,9 +214,9 @@ public TokenDatum build() { } } } - + public TokenDatum.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public TokenDatum newInstance(){ @@ -224,35 +224,35 @@ public TokenDatum newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends TokenDatum implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'count' field. - */ - public java.lang.Integer getCount() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'count' field. - * @param value the value to set. - */ - public void setCount(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'count' 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 isCountDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'count' field. + */ + public java.lang.Integer getCount() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'count' field. + * @param value the value to set. + */ + public void setCount(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'count' 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 isCountDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -291,6 +291,5 @@ public void readExternal(java.io.ObjectInput in) .directBinaryDecoder((java.io.InputStream) in, null)); } - -} +} diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java index 64f85f5e0..5fe939d49 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java @@ -14,11 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.gora.examples.generated; +package org.apache.gora.examples.generated; @SuppressWarnings("all") public class V2 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\":\"V2\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"v3\",\"type\":\"int\",\"default\":0}]}"); - private static final long serialVersionUID = -6468893522496148608L; + private static final long serialVersionUID = -6538763924317658547L; /** Enum containing all data bean's fields. */ public static enum Field { V3(0, "v3"), @@ -60,7 +60,7 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "v3", + "v3", }; /** @@ -73,20 +73,20 @@ public int getFieldsCount() { private int v3; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return v3; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return v3; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: v3 = (java.lang.Integer)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: v3 = (java.lang.Integer)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -105,7 +105,7 @@ public void setV3(java.lang.Integer value) { this.v3 = value; setDirty(0); } - + /** * Checks the dirty status of the 'v3' 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. @@ -118,19 +118,19 @@ public boolean isV3Dirty() { public static org.apache.gora.examples.generated.V2.Builder newBuilder() { return new org.apache.gora.examples.generated.V2.Builder(); } - + /** Creates a new V2 RecordBuilder by copying an existing Builder */ public static org.apache.gora.examples.generated.V2.Builder newBuilder(org.apache.gora.examples.generated.V2.Builder other) { return new org.apache.gora.examples.generated.V2.Builder(other); } - + /** Creates a new V2 RecordBuilder by copying an existing V2 instance */ public static org.apache.gora.examples.generated.V2.Builder newBuilder(org.apache.gora.examples.generated.V2 other) { return new org.apache.gora.examples.generated.V2.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -151,12 +151,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for V2 instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private int v3; @@ -164,15 +164,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.examples.generated.V2.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.examples.generated.V2.Builder other) { super(other); } - + /** Creates a Builder by copying an existing V2 instance */ private Builder(org.apache.gora.examples.generated.V2 other) { - super(org.apache.gora.examples.generated.V2.SCHEMA$); + super(org.apache.gora.examples.generated.V2.SCHEMA$); if (isValidValue(fields()[0], other.v3)) { this.v3 = (java.lang.Integer) data().deepCopy(fields()[0].schema(), other.v3); fieldSetFlags()[0] = true; @@ -183,26 +183,26 @@ private Builder(org.apache.gora.examples.generated.V2 other) { public java.lang.Integer getV3() { return v3; } - + /** Sets the value of the 'v3' field */ public org.apache.gora.examples.generated.V2.Builder setV3(int value) { validate(fields()[0], value); this.v3 = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'v3' field has been set */ public boolean hasV3() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'v3' field */ public org.apache.gora.examples.generated.V2.Builder clearV3() { fieldSetFlags()[0] = false; return this; } - + @Override public V2 build() { try { @@ -214,9 +214,9 @@ public V2 build() { } } } - + public V2.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public V2 newInstance(){ @@ -224,35 +224,35 @@ public V2 newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends V2 implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'v3' field. - */ - public java.lang.Integer getV3() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'v3' field. - * @param value the value to set. - */ - public void setV3(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'v3' 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 isV3Dirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'v3' field. + */ + public java.lang.Integer getV3() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'v3' field. + * @param value the value to set. + */ + public void setV3(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'v3' 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 isV3Dirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -293,4 +293,3 @@ public void readExternal(java.io.ObjectInput in) } } - diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java index a624a3d7a..c61b21447 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java @@ -1,13 +1,13 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ -package org.apache.gora.examples.generated; +package org.apache.gora.examples.generated; @SuppressWarnings("all") public class WebPage 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\":\"WebPage\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"content\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"parsedContent\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"headers\",\"type\":[\"null\",{\"type\":\"map\",\"values\":[\"null\",\"string\"]}],\"default\":null},{\"name\":\"metadata\",\"type\":{\"type\":\"record\",\"name\":\"Metadata\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":null}]},\"default\":null},{\"name\":\"byteData\",\"type\":{\"type\":\"map\",\"values\":\"bytes\"},\"default\":{}},{\"name\":\"stringData\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}}],\"default\":null}"); - private static final long serialVersionUID = -6468893522236148608L; + private static final long serialVersionUID = -2829100587222969501L; /** Enum containing all data bean's fields. */ public static enum Field { URL(0, "url"), @@ -56,14 +56,14 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "url", - "content", - "parsedContent", - "outlinks", - "headers", - "metadata", - "byteData", - "stringData", + "url", + "content", + "parsedContent", + "outlinks", + "headers", + "metadata", + "byteData", + "stringData", }; /** @@ -83,34 +83,34 @@ public int getFieldsCount() { private java.util.Map byteData; private java.util.Map stringData; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return url; - case 1: return content; - case 2: return parsedContent; - case 3: return outlinks; - case 4: return headers; - case 5: return metadata; - case 6: return byteData; - case 7: return stringData; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); - } - } - - // Used by DatumReader. Applications should not call. + case 0: return url; + case 1: return content; + case 2: return parsedContent; + case 3: return outlinks; + case 4: return headers; + case 5: return metadata; + case 6: return byteData; + case 7: return stringData; + 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: url = (java.lang.CharSequence)(value); break; - case 1: content = (java.nio.ByteBuffer)(value); break; - case 2: parsedContent = (java.util.List)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyListWrapper((java.util.List)value)); break; - case 3: outlinks = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; - case 4: headers = (java.util.Map)(value); break; - case 5: metadata = (org.apache.gora.examples.generated.Metadata)(value); break; - case 6: byteData = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; - case 7: stringData = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: url = (java.lang.CharSequence)(value); break; + case 1: content = (java.nio.ByteBuffer)(value); break; + case 2: parsedContent = (java.util.List)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyListWrapper((java.util.List)value)); break; + case 3: outlinks = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; + case 4: headers = (java.util.Map)(value); break; + case 5: metadata = (org.apache.gora.examples.generated.Metadata)(value); break; + case 6: byteData = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; + case 7: stringData = (java.util.Map)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -129,7 +129,7 @@ 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. @@ -153,7 +153,7 @@ public void setContent(java.nio.ByteBuffer value) { this.content = value; setDirty(1); } - + /** * Checks the dirty status of the 'content' 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. @@ -177,7 +177,7 @@ public void setParsedContent(java.util.List value) { this.parsedContent = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyListWrapper(value); setDirty(2); } - + /** * Checks the dirty status of the 'parsedContent' 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. @@ -201,7 +201,7 @@ public void setOutlinks(java.util.Map - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private java.lang.CharSequence url; private java.nio.ByteBuffer content; @@ -363,15 +363,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.examples.generated.WebPage.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.examples.generated.WebPage.Builder other) { super(other); } - + /** Creates a Builder by copying an existing WebPage instance */ private Builder(org.apache.gora.examples.generated.WebPage other) { - super(org.apache.gora.examples.generated.WebPage.SCHEMA$); + super(org.apache.gora.examples.generated.WebPage.SCHEMA$); if (isValidValue(fields()[0], other.url)) { this.url = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.url); fieldSetFlags()[0] = true; @@ -410,202 +410,202 @@ private Builder(org.apache.gora.examples.generated.WebPage other) { public java.lang.CharSequence getUrl() { return url; } - + /** Sets the value of the 'url' field */ public org.apache.gora.examples.generated.WebPage.Builder setUrl(java.lang.CharSequence value) { validate(fields()[0], value); this.url = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'url' field has been set */ public boolean hasUrl() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'url' field */ public org.apache.gora.examples.generated.WebPage.Builder clearUrl() { url = null; fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'content' field */ public java.nio.ByteBuffer getContent() { return content; } - + /** Sets the value of the 'content' field */ public org.apache.gora.examples.generated.WebPage.Builder setContent(java.nio.ByteBuffer value) { validate(fields()[1], value); this.content = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'content' field has been set */ public boolean hasContent() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'content' field */ public org.apache.gora.examples.generated.WebPage.Builder clearContent() { content = null; fieldSetFlags()[1] = false; return this; } - + /** Gets the value of the 'parsedContent' field */ public java.util.List getParsedContent() { return parsedContent; } - + /** Sets the value of the 'parsedContent' field */ public org.apache.gora.examples.generated.WebPage.Builder setParsedContent(java.util.List value) { validate(fields()[2], value); this.parsedContent = value; fieldSetFlags()[2] = true; - return this; + return this; } - + /** Checks whether the 'parsedContent' field has been set */ public boolean hasParsedContent() { return fieldSetFlags()[2]; } - + /** Clears the value of the 'parsedContent' field */ public org.apache.gora.examples.generated.WebPage.Builder clearParsedContent() { parsedContent = null; fieldSetFlags()[2] = false; return this; } - + /** Gets the value of the 'outlinks' field */ public java.util.Map getOutlinks() { return outlinks; } - + /** Sets the value of the 'outlinks' field */ public org.apache.gora.examples.generated.WebPage.Builder setOutlinks(java.util.Map value) { validate(fields()[3], value); this.outlinks = value; fieldSetFlags()[3] = true; - return this; + return this; } - + /** Checks whether the 'outlinks' field has been set */ public boolean hasOutlinks() { return fieldSetFlags()[3]; } - + /** Clears the value of the 'outlinks' field */ public org.apache.gora.examples.generated.WebPage.Builder clearOutlinks() { outlinks = null; fieldSetFlags()[3] = false; return this; } - + /** Gets the value of the 'headers' field */ public java.util.Map getHeaders() { return headers; } - + /** Sets the value of the 'headers' field */ public org.apache.gora.examples.generated.WebPage.Builder setHeaders(java.util.Map value) { validate(fields()[4], value); this.headers = value; fieldSetFlags()[4] = true; - return this; + return this; } - + /** Checks whether the 'headers' field has been set */ public boolean hasHeaders() { return fieldSetFlags()[4]; } - + /** Clears the value of the 'headers' field */ public org.apache.gora.examples.generated.WebPage.Builder clearHeaders() { headers = null; fieldSetFlags()[4] = false; return this; } - + /** Gets the value of the 'metadata' field */ public org.apache.gora.examples.generated.Metadata getMetadata() { return metadata; } - + /** Sets the value of the 'metadata' field */ public org.apache.gora.examples.generated.WebPage.Builder setMetadata(org.apache.gora.examples.generated.Metadata value) { validate(fields()[5], value); this.metadata = value; fieldSetFlags()[5] = true; - return this; + return this; } - + /** Checks whether the 'metadata' field has been set */ public boolean hasMetadata() { return fieldSetFlags()[5]; } - + /** Clears the value of the 'metadata' field */ public org.apache.gora.examples.generated.WebPage.Builder clearMetadata() { metadata = null; fieldSetFlags()[5] = false; return this; } - + /** Gets the value of the 'byteData' field */ public java.util.Map getByteData() { return byteData; } - + /** Sets the value of the 'byteData' field */ public org.apache.gora.examples.generated.WebPage.Builder setByteData(java.util.Map value) { validate(fields()[6], value); this.byteData = value; fieldSetFlags()[6] = true; - return this; + return this; } - + /** Checks whether the 'byteData' field has been set */ public boolean hasByteData() { return fieldSetFlags()[6]; } - + /** Clears the value of the 'byteData' field */ public org.apache.gora.examples.generated.WebPage.Builder clearByteData() { byteData = null; fieldSetFlags()[6] = false; return this; } - + /** Gets the value of the 'stringData' field */ public java.util.Map getStringData() { return stringData; } - + /** Sets the value of the 'stringData' field */ public org.apache.gora.examples.generated.WebPage.Builder setStringData(java.util.Map value) { validate(fields()[7], value); this.stringData = value; fieldSetFlags()[7] = true; - return this; + return this; } - + /** Checks whether the 'stringData' field has been set */ public boolean hasStringData() { return fieldSetFlags()[7]; } - + /** Clears the value of the 'stringData' field */ public org.apache.gora.examples.generated.WebPage.Builder clearStringData() { stringData = null; fieldSetFlags()[7] = false; return this; } - + @Override public WebPage build() { try { @@ -624,9 +624,9 @@ public WebPage build() { } } } - + public WebPage.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public WebPage newInstance(){ @@ -634,196 +634,196 @@ public WebPage newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends WebPage implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'url' field. - */ - public java.lang.CharSequence getUrl() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'url' field. - * @param value the value to set. - */ - public void setUrl(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * 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() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'content' field. - */ - public java.nio.ByteBuffer getContent() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'content' field. - * @param value the value to set. - */ - public void setContent(java.nio.ByteBuffer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'content' 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 isContentDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'parsedContent' field. - */ - public java.util.List getParsedContent() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'parsedContent' field. - * @param value the value to set. - */ - public void setParsedContent(java.util.List value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'parsedContent' 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 isParsedContentDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'outlinks' field. - */ - public java.util.Map getOutlinks() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'outlinks' field. - * @param value the value to set. - */ - public void setOutlinks(java.util.Map value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'outlinks' 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 isOutlinksDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'headers' field. - */ - public java.util.Map getHeaders() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'headers' field. - * @param value the value to set. - */ - public void setHeaders(java.util.Map value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'headers' 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 isHeadersDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'metadata' field. - */ - public org.apache.gora.examples.generated.Metadata getMetadata() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'metadata' field. - * @param value the value to set. - */ - public void setMetadata(org.apache.gora.examples.generated.Metadata value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'metadata' 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 isMetadataDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'byteData' field. - */ - public java.util.Map getByteData() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'byteData' field. - * @param value the value to set. - */ - public void setByteData(java.util.Map value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'byteData' 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 isByteDataDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'stringData' field. - */ - public java.util.Map getStringData() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'stringData' field. - * @param value the value to set. - */ - public void setStringData(java.util.Map value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'stringData' 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 isStringDataDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'url' field. + */ + public java.lang.CharSequence getUrl() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'url' field. + * @param value the value to set. + */ + public void setUrl(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * 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() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'content' field. + */ + public java.nio.ByteBuffer getContent() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'content' field. + * @param value the value to set. + */ + public void setContent(java.nio.ByteBuffer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'content' 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 isContentDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'parsedContent' field. + */ + public java.util.List getParsedContent() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'parsedContent' field. + * @param value the value to set. + */ + public void setParsedContent(java.util.List value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'parsedContent' 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 isParsedContentDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'outlinks' field. + */ + public java.util.Map getOutlinks() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'outlinks' field. + * @param value the value to set. + */ + public void setOutlinks(java.util.Map value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'outlinks' 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 isOutlinksDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'headers' field. + */ + public java.util.Map getHeaders() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'headers' field. + * @param value the value to set. + */ + public void setHeaders(java.util.Map value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'headers' 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 isHeadersDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'metadata' field. + */ + public org.apache.gora.examples.generated.Metadata getMetadata() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'metadata' field. + * @param value the value to set. + */ + public void setMetadata(org.apache.gora.examples.generated.Metadata value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'metadata' 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 isMetadataDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'byteData' field. + */ + public java.util.Map getByteData() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'byteData' field. + * @param value the value to set. + */ + public void setByteData(java.util.Map value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'byteData' 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 isByteDataDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'stringData' field. + */ + public java.util.Map getStringData() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'stringData' field. + * @param value the value to set. + */ + public void setStringData(java.util.Map value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'stringData' 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 isStringDataDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -864,4 +864,3 @@ public void readExternal(java.io.ObjectInput in) } } - diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java index 3dddfd05a..b6e796ad0 100644 --- a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java +++ b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java @@ -1,13 +1,13 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ -package org.apache.gora.goraci.generated; +package org.apache.gora.goraci.generated; @SuppressWarnings("all") public class CINode 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\":\"CINode\",\"namespace\":\"org.apache.gora.goraci.generated\",\"fields\":[{\"name\":\"prev\",\"type\":\"long\",\"default\":0},{\"name\":\"client\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"count\",\"type\":\"long\",\"default\":0}]}"); - private static final long serialVersionUID = -6468893532296148608L; + private static final long serialVersionUID = 1014651356631895518L; /** Enum containing all data bean's fields. */ public static enum Field { PREV(0, "prev"), @@ -51,9 +51,9 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "prev", - "client", - "count", + "prev", + "client", + "count", }; /** @@ -68,24 +68,24 @@ public int getFieldsCount() { private java.lang.CharSequence client; private long count; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return prev; - case 1: return client; - case 2: return count; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return prev; + case 1: return client; + case 2: return count; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: prev = (java.lang.Long)(value); break; - case 1: client = (java.lang.CharSequence)(value); break; - case 2: count = (java.lang.Long)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: prev = (java.lang.Long)(value); break; + case 1: client = (java.lang.CharSequence)(value); break; + case 2: count = (java.lang.Long)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -104,9 +104,10 @@ public void setPrev(java.lang.Long value) { this.prev = value; setDirty(0); } - + /** * Checks the dirty status of the 'prev' 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 isPrevDirty() { return isDirty(0); @@ -127,9 +128,10 @@ public void setClient(java.lang.CharSequence value) { this.client = value; setDirty(1); } - + /** * Checks the dirty status of the 'client' 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 isClientDirty() { return isDirty(1); @@ -150,9 +152,10 @@ public void setCount(java.lang.Long value) { this.count = value; setDirty(2); } - + /** * Checks the dirty status of the 'count' 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 isCountDirty() { return isDirty(2); @@ -162,19 +165,19 @@ public boolean isCountDirty() { public static org.apache.gora.goraci.generated.CINode.Builder newBuilder() { return new org.apache.gora.goraci.generated.CINode.Builder(); } - + /** Creates a new CINode RecordBuilder by copying an existing Builder */ public static org.apache.gora.goraci.generated.CINode.Builder newBuilder(org.apache.gora.goraci.generated.CINode.Builder other) { return new org.apache.gora.goraci.generated.CINode.Builder(other); } - + /** Creates a new CINode RecordBuilder by copying an existing CINode instance */ public static org.apache.gora.goraci.generated.CINode.Builder newBuilder(org.apache.gora.goraci.generated.CINode other) { return new org.apache.gora.goraci.generated.CINode.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -195,12 +198,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for CINode instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private long prev; private java.lang.CharSequence client; @@ -210,15 +213,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.goraci.generated.CINode.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.goraci.generated.CINode.Builder other) { super(other); } - + /** Creates a Builder by copying an existing CINode instance */ private Builder(org.apache.gora.goraci.generated.CINode other) { - super(org.apache.gora.goraci.generated.CINode.SCHEMA$); + super(org.apache.gora.goraci.generated.CINode.SCHEMA$); if (isValidValue(fields()[0], other.prev)) { this.prev = (java.lang.Long) data().deepCopy(fields()[0].schema(), other.prev); fieldSetFlags()[0] = true; @@ -237,75 +240,75 @@ private Builder(org.apache.gora.goraci.generated.CINode other) { public java.lang.Long getPrev() { return prev; } - + /** Sets the value of the 'prev' field */ public org.apache.gora.goraci.generated.CINode.Builder setPrev(long value) { validate(fields()[0], value); this.prev = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'prev' field has been set */ public boolean hasPrev() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'prev' field */ public org.apache.gora.goraci.generated.CINode.Builder clearPrev() { fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'client' field */ public java.lang.CharSequence getClient() { return client; } - + /** Sets the value of the 'client' field */ public org.apache.gora.goraci.generated.CINode.Builder setClient(java.lang.CharSequence value) { validate(fields()[1], value); this.client = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'client' field has been set */ public boolean hasClient() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'client' field */ public org.apache.gora.goraci.generated.CINode.Builder clearClient() { client = null; fieldSetFlags()[1] = false; return this; } - + /** Gets the value of the 'count' field */ public java.lang.Long getCount() { return count; } - + /** Sets the value of the 'count' field */ public org.apache.gora.goraci.generated.CINode.Builder setCount(long value) { validate(fields()[2], value); this.count = value; fieldSetFlags()[2] = true; - return this; + return this; } - + /** Checks whether the 'count' field has been set */ public boolean hasCount() { return fieldSetFlags()[2]; } - + /** Clears the value of the 'count' field */ public org.apache.gora.goraci.generated.CINode.Builder clearCount() { fieldSetFlags()[2] = false; return this; } - + @Override public CINode build() { try { @@ -319,9 +322,9 @@ public CINode build() { } } } - + public CINode.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public CINode newInstance(){ @@ -329,78 +332,81 @@ public CINode newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends CINode implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'prev' field. - */ - public java.lang.Long getPrev() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'prev' field. - * @param value the value to set. - */ - public void setPrev(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'prev' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isPrevDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'client' field. - */ - public java.lang.CharSequence getClient() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'client' field. - * @param value the value to set. - */ - public void setClient(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'client' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isClientDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'count' field. - */ - public java.lang.Long getCount() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'count' field. - * @param value the value to set. - */ - public void setCount(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'count' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isCountDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'prev' field. + */ + public java.lang.Long getPrev() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'prev' field. + * @param value the value to set. + */ + public void setPrev(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'prev' 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 isPrevDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'client' field. + */ + public java.lang.CharSequence getClient() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'client' field. + * @param value the value to set. + */ + public void setClient(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'client' 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 isClientDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'count' field. + */ + public java.lang.Long getCount() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'count' field. + * @param value the value to set. + */ + public void setCount(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'count' 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 isCountDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -439,6 +445,5 @@ public void readExternal(java.io.ObjectInput in) .directBinaryDecoder((java.io.InputStream) in, null)); } - -} +} diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java index 53bfaec46..f9eae596e 100644 --- a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java +++ b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java @@ -1,13 +1,13 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ -package org.apache.gora.goraci.generated; +package org.apache.gora.goraci.generated; @SuppressWarnings("all") public class Flushed 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\":\"Flushed\",\"namespace\":\"org.apache.gora.goraci.generated\",\"fields\":[{\"name\":\"count\",\"type\":\"long\",\"default\":0}]}"); - private static final long serialVersionUID = -6468883532296148608L; + private static final long serialVersionUID = -8888031915401438521L; /** Enum containing all data bean's fields. */ public static enum Field { COUNT(0, "count"), @@ -49,7 +49,7 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "count", + "count", }; /** @@ -62,20 +62,20 @@ public int getFieldsCount() { private long count; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return count; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return count; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: count = (java.lang.Long)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: count = (java.lang.Long)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -94,9 +94,10 @@ public void setCount(java.lang.Long value) { this.count = value; setDirty(0); } - + /** * Checks the dirty status of the 'count' 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 isCountDirty() { return isDirty(0); @@ -106,19 +107,19 @@ public boolean isCountDirty() { public static org.apache.gora.goraci.generated.Flushed.Builder newBuilder() { return new org.apache.gora.goraci.generated.Flushed.Builder(); } - + /** Creates a new Flushed RecordBuilder by copying an existing Builder */ public static org.apache.gora.goraci.generated.Flushed.Builder newBuilder(org.apache.gora.goraci.generated.Flushed.Builder other) { return new org.apache.gora.goraci.generated.Flushed.Builder(other); } - + /** Creates a new Flushed RecordBuilder by copying an existing Flushed instance */ public static org.apache.gora.goraci.generated.Flushed.Builder newBuilder(org.apache.gora.goraci.generated.Flushed other) { return new org.apache.gora.goraci.generated.Flushed.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -139,12 +140,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for Flushed instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private long count; @@ -152,15 +153,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.goraci.generated.Flushed.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.goraci.generated.Flushed.Builder other) { super(other); } - + /** Creates a Builder by copying an existing Flushed instance */ private Builder(org.apache.gora.goraci.generated.Flushed other) { - super(org.apache.gora.goraci.generated.Flushed.SCHEMA$); + super(org.apache.gora.goraci.generated.Flushed.SCHEMA$); if (isValidValue(fields()[0], other.count)) { this.count = (java.lang.Long) data().deepCopy(fields()[0].schema(), other.count); fieldSetFlags()[0] = true; @@ -171,26 +172,26 @@ private Builder(org.apache.gora.goraci.generated.Flushed other) { public java.lang.Long getCount() { return count; } - + /** Sets the value of the 'count' field */ public org.apache.gora.goraci.generated.Flushed.Builder setCount(long value) { validate(fields()[0], value); this.count = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'count' field has been set */ public boolean hasCount() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'count' field */ public org.apache.gora.goraci.generated.Flushed.Builder clearCount() { fieldSetFlags()[0] = false; return this; } - + @Override public Flushed build() { try { @@ -202,9 +203,9 @@ public Flushed build() { } } } - + public Flushed.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public Flushed newInstance(){ @@ -212,34 +213,35 @@ public Flushed newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends Flushed implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'count' field. - */ - public java.lang.Long getCount() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'count' field. - * @param value the value to set. - */ - public void setCount(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'count' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isCountDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'count' field. + */ + public java.lang.Long getCount() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'count' field. + * @param value the value to set. + */ + public void setCount(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'count' 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 isCountDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -278,6 +280,5 @@ public void readExternal(java.io.ObjectInput in) .directBinaryDecoder((java.io.InputStream) in, null)); } - -} +} diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java index 4b541bc81..5fa11a8e9 100644 --- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java +++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java @@ -1,12 +1,13 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ -package org.apache.gora.tutorial.log.generated; +package org.apache.gora.tutorial.log.generated; +@SuppressWarnings("all") public class MetricDatum 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\":\"MetricDatum\",\"namespace\":\"org.apache.gora.tutorial.log.generated\",\"fields\":[{\"name\":\"metricDimension\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0},{\"name\":\"metric\",\"type\":\"long\",\"default\":0}],\"default\":null}"); - private static final long serialVersionUID = -6468793522296148608L; + private static final long serialVersionUID = 8278557845311856507L; /** Enum containing all data bean's fields. */ public static enum Field { METRIC_DIMENSION(0, "metricDimension"), @@ -50,9 +51,9 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "metricDimension", - "timestamp", - "metric", + "metricDimension", + "timestamp", + "metric", }; /** @@ -67,24 +68,24 @@ public int getFieldsCount() { private long timestamp; private long metric; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return metricDimension; - case 1: return timestamp; - case 2: return metric; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: return metricDimension; + case 1: return timestamp; + case 2: return metric; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } - - // Used by DatumReader. Applications should not call. + + // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value) { switch (field$) { - case 0: metricDimension = (java.lang.CharSequence)(value); break; - case 1: timestamp = (java.lang.Long)(value); break; - case 2: metric = (java.lang.Long)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: metricDimension = (java.lang.CharSequence)(value); break; + case 1: timestamp = (java.lang.Long)(value); break; + case 2: metric = (java.lang.Long)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -103,9 +104,10 @@ public void setMetricDimension(java.lang.CharSequence value) { this.metricDimension = value; setDirty(0); } - + /** * Checks the dirty status of the 'metricDimension' 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 isMetricDimensionDirty() { return isDirty(0); @@ -126,9 +128,10 @@ 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); @@ -149,9 +152,10 @@ public void setMetric(java.lang.Long value) { this.metric = value; setDirty(2); } - + /** * Checks the dirty status of the 'metric' 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 isMetricDirty() { return isDirty(2); @@ -161,19 +165,19 @@ public boolean isMetricDirty() { public static org.apache.gora.tutorial.log.generated.MetricDatum.Builder newBuilder() { return new org.apache.gora.tutorial.log.generated.MetricDatum.Builder(); } - + /** Creates a new MetricDatum RecordBuilder by copying an existing Builder */ public static org.apache.gora.tutorial.log.generated.MetricDatum.Builder newBuilder(org.apache.gora.tutorial.log.generated.MetricDatum.Builder other) { return new org.apache.gora.tutorial.log.generated.MetricDatum.Builder(other); } - + /** Creates a new MetricDatum RecordBuilder by copying an existing MetricDatum instance */ public static org.apache.gora.tutorial.log.generated.MetricDatum.Builder newBuilder(org.apache.gora.tutorial.log.generated.MetricDatum other) { return new org.apache.gora.tutorial.log.generated.MetricDatum.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -194,12 +198,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for MetricDatum instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private java.lang.CharSequence metricDimension; private long timestamp; @@ -209,15 +213,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.tutorial.log.generated.MetricDatum.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.tutorial.log.generated.MetricDatum.Builder other) { super(other); } - + /** Creates a Builder by copying an existing MetricDatum instance */ private Builder(org.apache.gora.tutorial.log.generated.MetricDatum other) { - super(org.apache.gora.tutorial.log.generated.MetricDatum.SCHEMA$); + super(org.apache.gora.tutorial.log.generated.MetricDatum.SCHEMA$); if (isValidValue(fields()[0], other.metricDimension)) { this.metricDimension = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.metricDimension); fieldSetFlags()[0] = true; @@ -236,75 +240,75 @@ private Builder(org.apache.gora.tutorial.log.generated.MetricDatum other) { public java.lang.CharSequence getMetricDimension() { return metricDimension; } - + /** Sets the value of the 'metricDimension' field */ public org.apache.gora.tutorial.log.generated.MetricDatum.Builder setMetricDimension(java.lang.CharSequence value) { validate(fields()[0], value); this.metricDimension = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'metricDimension' field has been set */ public boolean hasMetricDimension() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'metricDimension' field */ public org.apache.gora.tutorial.log.generated.MetricDatum.Builder clearMetricDimension() { metricDimension = null; fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'timestamp' field */ public java.lang.Long getTimestamp() { return timestamp; } - + /** Sets the value of the 'timestamp' field */ public org.apache.gora.tutorial.log.generated.MetricDatum.Builder setTimestamp(long value) { validate(fields()[1], value); this.timestamp = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'timestamp' field has been set */ public boolean hasTimestamp() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'timestamp' field */ public org.apache.gora.tutorial.log.generated.MetricDatum.Builder clearTimestamp() { fieldSetFlags()[1] = false; return this; } - + /** Gets the value of the 'metric' field */ public java.lang.Long getMetric() { return metric; } - + /** Sets the value of the 'metric' field */ public org.apache.gora.tutorial.log.generated.MetricDatum.Builder setMetric(long value) { validate(fields()[2], value); this.metric = value; fieldSetFlags()[2] = true; - return this; + return this; } - + /** Checks whether the 'metric' field has been set */ public boolean hasMetric() { return fieldSetFlags()[2]; } - + /** Clears the value of the 'metric' field */ public org.apache.gora.tutorial.log.generated.MetricDatum.Builder clearMetric() { fieldSetFlags()[2] = false; return this; } - + @Override public MetricDatum build() { try { @@ -318,9 +322,9 @@ public MetricDatum build() { } } } - + public MetricDatum.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public MetricDatum newInstance(){ @@ -328,78 +332,81 @@ public MetricDatum newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends MetricDatum implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'metricDimension' field. - */ - public java.lang.CharSequence getMetricDimension() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'metricDimension' field. - * @param value the value to set. - */ - public void setMetricDimension(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'metricDimension' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isMetricDimensionDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'timestamp' field. - */ - public java.lang.Long getTimestamp() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'timestamp' field. - * @param value the value to set. - */ - public void setTimestamp(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * 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. - */ - public boolean isTimestampDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'metric' field. - */ - public java.lang.Long getMetric() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'metric' field. - * @param value the value to set. - */ - public void setMetric(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'metric' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isMetricDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + + private Tombstone() { } + + /** + * Gets the value of the 'metricDimension' field. + */ + public java.lang.CharSequence getMetricDimension() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'metricDimension' field. + * @param value the value to set. + */ + public void setMetricDimension(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'metricDimension' 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 isMetricDimensionDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'timestamp' field. + */ + public java.lang.Long getTimestamp() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'timestamp' field. + * @param value the value to set. + */ + public void setTimestamp(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * 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() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'metric' field. + */ + public java.lang.Long getMetric() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'metric' field. + * @param value the value to set. + */ + public void setMetric(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'metric' 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 isMetricDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -438,6 +445,5 @@ public void readExternal(java.io.ObjectInput in) .directBinaryDecoder((java.io.InputStream) in, null)); } - -} +} diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java index 048b37995..7870b927e 100644 --- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java +++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java @@ -1,14 +1,13 @@ /** * Autogenerated by Avro - * + * * DO NOT EDIT DIRECTLY */ package org.apache.gora.tutorial.log.generated; - @SuppressWarnings("all") public class Pageview 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\":\"Pageview\",\"namespace\":\"org.apache.gora.tutorial.log.generated\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0},{\"name\":\"ip\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"httpMethod\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"httpStatusCode\",\"type\":\"int\",\"default\":0},{\"name\":\"responseSize\",\"type\":\"int\",\"default\":0},{\"name\":\"referrer\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"userAgent\",\"type\":[\"null\",\"string\"],\"default\":null}],\"default\":null}"); - private static final long serialVersionUID = -6468893522296148608L; + private static final long serialVersionUID = -6136058768384995982L; /** Enum containing all data bean's fields. */ public static enum Field { URL(0, "url"), @@ -57,14 +56,14 @@ public static enum Field { }; public static final String[] _ALL_FIELDS = { - "url", - "timestamp", - "ip", - "httpMethod", - "httpStatusCode", - "responseSize", - "referrer", - "userAgent", + "url", + "timestamp", + "ip", + "httpMethod", + "httpStatusCode", + "responseSize", + "referrer", + "userAgent", }; /** @@ -84,34 +83,34 @@ public int getFieldsCount() { private java.lang.CharSequence referrer; private java.lang.CharSequence userAgent; public org.apache.avro.Schema getSchema() { return SCHEMA$; } - // Used by DatumWriter. Applications should not call. + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { - case 0: return url; - case 1: return timestamp; - case 2: return ip; - case 3: return httpMethod; - case 4: return httpStatusCode; - case 5: return responseSize; - case 6: return referrer; - case 7: return userAgent; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); - } - } - - // Used by DatumReader. Applications should not call. + case 0: return url; + case 1: return timestamp; + case 2: return ip; + case 3: return httpMethod; + case 4: return httpStatusCode; + case 5: return responseSize; + case 6: return referrer; + case 7: return userAgent; + 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: url = (java.lang.CharSequence)(value); break; - case 1: timestamp = (java.lang.Long)(value); break; - case 2: ip = (java.lang.CharSequence)(value); break; - case 3: httpMethod = (java.lang.CharSequence)(value); break; - case 4: httpStatusCode = (java.lang.Integer)(value); break; - case 5: responseSize = (java.lang.Integer)(value); break; - case 6: referrer = (java.lang.CharSequence)(value); break; - case 7: userAgent = (java.lang.CharSequence)(value); break; - default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + case 0: url = (java.lang.CharSequence)(value); break; + case 1: timestamp = (java.lang.Long)(value); break; + case 2: ip = (java.lang.CharSequence)(value); break; + case 3: httpMethod = (java.lang.CharSequence)(value); break; + case 4: httpStatusCode = (java.lang.Integer)(value); break; + case 5: responseSize = (java.lang.Integer)(value); break; + case 6: referrer = (java.lang.CharSequence)(value); break; + case 7: userAgent = (java.lang.CharSequence)(value); break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } @@ -130,9 +129,10 @@ 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); @@ -153,9 +153,10 @@ 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); @@ -176,9 +177,10 @@ public void setIp(java.lang.CharSequence value) { this.ip = value; setDirty(2); } - + /** * Checks the dirty status of the 'ip' 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 isIpDirty() { return isDirty(2); @@ -199,9 +201,10 @@ public void setHttpMethod(java.lang.CharSequence value) { this.httpMethod = value; setDirty(3); } - + /** * Checks the dirty status of the 'httpMethod' 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 isHttpMethodDirty() { return isDirty(3); @@ -222,9 +225,10 @@ public void setHttpStatusCode(java.lang.Integer value) { this.httpStatusCode = value; setDirty(4); } - + /** * Checks the dirty status of the 'httpStatusCode' 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 isHttpStatusCodeDirty() { return isDirty(4); @@ -245,9 +249,10 @@ public void setResponseSize(java.lang.Integer value) { this.responseSize = value; setDirty(5); } - + /** * Checks the dirty status of the 'responseSize' 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 isResponseSizeDirty() { return isDirty(5); @@ -268,9 +273,10 @@ public void setReferrer(java.lang.CharSequence value) { this.referrer = value; setDirty(6); } - + /** * Checks the dirty status of the 'referrer' 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 isReferrerDirty() { return isDirty(6); @@ -291,9 +297,10 @@ public void setUserAgent(java.lang.CharSequence value) { this.userAgent = value; setDirty(7); } - + /** * Checks the dirty status of the 'userAgent' 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 isUserAgentDirty() { return isDirty(7); @@ -303,19 +310,19 @@ public boolean isUserAgentDirty() { public static org.apache.gora.tutorial.log.generated.Pageview.Builder newBuilder() { return new org.apache.gora.tutorial.log.generated.Pageview.Builder(); } - + /** Creates a new Pageview RecordBuilder by copying an existing Builder */ public static org.apache.gora.tutorial.log.generated.Pageview.Builder newBuilder(org.apache.gora.tutorial.log.generated.Pageview.Builder other) { return new org.apache.gora.tutorial.log.generated.Pageview.Builder(other); } - + /** Creates a new Pageview RecordBuilder by copying an existing Pageview instance */ public static org.apache.gora.tutorial.log.generated.Pageview.Builder newBuilder(org.apache.gora.tutorial.log.generated.Pageview other) { return new org.apache.gora.tutorial.log.generated.Pageview.Builder(other); } - + private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( - java.nio.ByteBuffer input) { + java.nio.ByteBuffer input) { java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity()); int position = input.position(); input.reset(); @@ -336,12 +343,12 @@ private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer( copy.limit(limit); return copy.asReadOnlyBuffer(); } - + /** * RecordBuilder for Pageview instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase - implements org.apache.avro.data.RecordBuilder { + implements org.apache.avro.data.RecordBuilder { private java.lang.CharSequence url; private long timestamp; @@ -356,15 +363,15 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild private Builder() { super(org.apache.gora.tutorial.log.generated.Pageview.SCHEMA$); } - + /** Creates a Builder by copying an existing Builder */ private Builder(org.apache.gora.tutorial.log.generated.Pageview.Builder other) { super(other); } - + /** Creates a Builder by copying an existing Pageview instance */ private Builder(org.apache.gora.tutorial.log.generated.Pageview other) { - super(org.apache.gora.tutorial.log.generated.Pageview.SCHEMA$); + super(org.apache.gora.tutorial.log.generated.Pageview.SCHEMA$); if (isValidValue(fields()[0], other.url)) { this.url = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.url); fieldSetFlags()[0] = true; @@ -403,199 +410,199 @@ private Builder(org.apache.gora.tutorial.log.generated.Pageview other) { public java.lang.CharSequence getUrl() { return url; } - + /** Sets the value of the 'url' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setUrl(java.lang.CharSequence value) { validate(fields()[0], value); this.url = value; fieldSetFlags()[0] = true; - return this; + return this; } - + /** Checks whether the 'url' field has been set */ public boolean hasUrl() { return fieldSetFlags()[0]; } - + /** Clears the value of the 'url' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearUrl() { url = null; fieldSetFlags()[0] = false; return this; } - + /** Gets the value of the 'timestamp' field */ public java.lang.Long getTimestamp() { return timestamp; } - + /** Sets the value of the 'timestamp' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setTimestamp(long value) { validate(fields()[1], value); this.timestamp = value; fieldSetFlags()[1] = true; - return this; + return this; } - + /** Checks whether the 'timestamp' field has been set */ public boolean hasTimestamp() { return fieldSetFlags()[1]; } - + /** Clears the value of the 'timestamp' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearTimestamp() { fieldSetFlags()[1] = false; return this; } - + /** Gets the value of the 'ip' field */ public java.lang.CharSequence getIp() { return ip; } - + /** Sets the value of the 'ip' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setIp(java.lang.CharSequence value) { validate(fields()[2], value); this.ip = value; fieldSetFlags()[2] = true; - return this; + return this; } - + /** Checks whether the 'ip' field has been set */ public boolean hasIp() { return fieldSetFlags()[2]; } - + /** Clears the value of the 'ip' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearIp() { ip = null; fieldSetFlags()[2] = false; return this; } - + /** Gets the value of the 'httpMethod' field */ public java.lang.CharSequence getHttpMethod() { return httpMethod; } - + /** Sets the value of the 'httpMethod' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setHttpMethod(java.lang.CharSequence value) { validate(fields()[3], value); this.httpMethod = value; fieldSetFlags()[3] = true; - return this; + return this; } - + /** Checks whether the 'httpMethod' field has been set */ public boolean hasHttpMethod() { return fieldSetFlags()[3]; } - + /** Clears the value of the 'httpMethod' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearHttpMethod() { httpMethod = null; fieldSetFlags()[3] = false; return this; } - + /** Gets the value of the 'httpStatusCode' field */ public java.lang.Integer getHttpStatusCode() { return httpStatusCode; } - + /** Sets the value of the 'httpStatusCode' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setHttpStatusCode(int value) { validate(fields()[4], value); this.httpStatusCode = value; fieldSetFlags()[4] = true; - return this; + return this; } - + /** Checks whether the 'httpStatusCode' field has been set */ public boolean hasHttpStatusCode() { return fieldSetFlags()[4]; } - + /** Clears the value of the 'httpStatusCode' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearHttpStatusCode() { fieldSetFlags()[4] = false; return this; } - + /** Gets the value of the 'responseSize' field */ public java.lang.Integer getResponseSize() { return responseSize; } - + /** Sets the value of the 'responseSize' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setResponseSize(int value) { validate(fields()[5], value); this.responseSize = value; fieldSetFlags()[5] = true; - return this; + return this; } - + /** Checks whether the 'responseSize' field has been set */ public boolean hasResponseSize() { return fieldSetFlags()[5]; } - + /** Clears the value of the 'responseSize' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearResponseSize() { fieldSetFlags()[5] = false; return this; } - + /** Gets the value of the 'referrer' field */ public java.lang.CharSequence getReferrer() { return referrer; } - + /** Sets the value of the 'referrer' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setReferrer(java.lang.CharSequence value) { validate(fields()[6], value); this.referrer = value; fieldSetFlags()[6] = true; - return this; + return this; } - + /** Checks whether the 'referrer' field has been set */ public boolean hasReferrer() { return fieldSetFlags()[6]; } - + /** Clears the value of the 'referrer' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearReferrer() { referrer = null; fieldSetFlags()[6] = false; return this; } - + /** Gets the value of the 'userAgent' field */ public java.lang.CharSequence getUserAgent() { return userAgent; } - + /** Sets the value of the 'userAgent' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder setUserAgent(java.lang.CharSequence value) { validate(fields()[7], value); this.userAgent = value; fieldSetFlags()[7] = true; - return this; + return this; } - + /** Checks whether the 'userAgent' field has been set */ public boolean hasUserAgent() { return fieldSetFlags()[7]; } - + /** Clears the value of the 'userAgent' field */ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearUserAgent() { userAgent = null; fieldSetFlags()[7] = false; return this; } - + @Override public Pageview build() { try { @@ -614,9 +621,9 @@ public Pageview build() { } } } - + public Pageview.Tombstone getTombstone(){ - return TOMBSTONE; + return TOMBSTONE; } public Pageview newInstance(){ @@ -624,188 +631,196 @@ public Pageview newInstance(){ } private static final Tombstone TOMBSTONE = new Tombstone(); - + public static final class Tombstone extends Pageview implements org.apache.gora.persistency.Tombstone { - - private Tombstone() { } - - /** - * Gets the value of the 'url' field. - */ - public java.lang.CharSequence getUrl() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'url' field. - * @param value the value to set. - */ - public void setUrl(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * 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. - */ - public boolean isUrlDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'timestamp' field. - */ - public java.lang.Long getTimestamp() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'timestamp' field. - * @param value the value to set. - */ - public void setTimestamp(java.lang.Long value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * 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. - */ - public boolean isTimestampDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'ip' field. - */ - public java.lang.CharSequence getIp() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'ip' field. - * @param value the value to set. - */ - public void setIp(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'ip' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isIpDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'httpMethod' field. - */ - public java.lang.CharSequence getHttpMethod() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'httpMethod' field. - * @param value the value to set. - */ - public void setHttpMethod(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'httpMethod' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isHttpMethodDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'httpStatusCode' field. - */ - public java.lang.Integer getHttpStatusCode() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'httpStatusCode' field. - * @param value the value to set. - */ - public void setHttpStatusCode(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'httpStatusCode' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isHttpStatusCodeDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'responseSize' field. - */ - public java.lang.Integer getResponseSize() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'responseSize' field. - * @param value the value to set. - */ - public void setResponseSize(java.lang.Integer value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'responseSize' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isResponseSizeDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'referrer' field. - */ - public java.lang.CharSequence getReferrer() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } - - /** - * Sets the value of the 'referrer' field. - * @param value the value to set. - */ - public void setReferrer(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } + + private Tombstone() { } + + /** + * Gets the value of the 'url' field. + */ + public java.lang.CharSequence getUrl() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'url' field. + * @param value the value to set. + */ + public void setUrl(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * 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() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'timestamp' field. + */ + public java.lang.Long getTimestamp() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'timestamp' field. + * @param value the value to set. + */ + public void setTimestamp(java.lang.Long value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * 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() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'ip' field. + */ + public java.lang.CharSequence getIp() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'ip' field. + * @param value the value to set. + */ + public void setIp(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'ip' 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 isIpDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'httpMethod' field. + */ + public java.lang.CharSequence getHttpMethod() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'httpMethod' field. + * @param value the value to set. + */ + public void setHttpMethod(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'httpMethod' 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 isHttpMethodDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'httpStatusCode' field. + */ + public java.lang.Integer getHttpStatusCode() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'httpStatusCode' field. + * @param value the value to set. + */ + public void setHttpStatusCode(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'httpStatusCode' 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 isHttpStatusCodeDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'responseSize' field. + */ + public java.lang.Integer getResponseSize() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'responseSize' field. + * @param value the value to set. + */ + public void setResponseSize(java.lang.Integer value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'responseSize' 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 isResponseSizeDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'referrer' field. + */ + public java.lang.CharSequence getReferrer() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } + + /** + * Sets the value of the 'referrer' field. + * @param value the value to set. + */ + public void setReferrer(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } /** * Checks the dirty status of the 'referrer' 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 isReferrerDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - /** - * Gets the value of the 'userAgent' field. - */ - public java.lang.CharSequence getUserAgent() { - throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); - } + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + /** + * Gets the value of the 'userAgent' field. + */ + public java.lang.CharSequence getUserAgent() { + throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones"); + } /** * Sets the value of the 'userAgent' field. * @param value the value to set. - */ - public void setUserAgent(java.lang.CharSequence value) { - throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); - } - - /** - * Checks the dirty status of the 'userAgent' field. A field is dirty if it represents a change that has not yet been written to the database. - */ - public boolean isUserAgentDirty() { - throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); - } - - + */ + public void setUserAgent(java.lang.CharSequence value) { + throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones"); + } + + /** + * Checks the dirty status of the 'userAgent' 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 isUserAgentDirty() { + throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones"); + } + + } private static final org.apache.avro.io.DatumWriter @@ -846,4 +861,3 @@ public void readExternal(java.io.ObjectInput in) } } - From 1d06958112db2a96b6b61934d3bbae9c33270019 Mon Sep 17 00:00:00 2001 From: Kevin Ratnasekera Date: Sat, 17 Sep 2016 04:34:57 +0530 Subject: [PATCH 3/4] addding license headers --- .../apache/gora/examples/generated/Employee.java | 16 ++++++++++++++-- .../apache/gora/examples/generated/Metadata.java | 16 ++++++++++++++-- .../apache/gora/examples/generated/WebPage.java | 16 ++++++++++++++-- .../org/apache/gora/goraci/generated/CINode.java | 16 ++++++++++++++-- .../apache/gora/goraci/generated/Flushed.java | 16 ++++++++++++++-- .../gora/tutorial/log/generated/MetricDatum.java | 16 ++++++++++++++-- .../gora/tutorial/log/generated/Pageview.java | 16 ++++++++++++++-- 7 files changed, 98 insertions(+), 14 deletions(-) diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java index fc0754ee6..2941e70bb 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.examples.generated; @SuppressWarnings("all") diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java index d332693f1..4234d3764 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.examples.generated; @SuppressWarnings("all") diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java index c61b21447..8b0a63384 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.examples.generated; @SuppressWarnings("all") diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java index b6e796ad0..dd2138084 100644 --- a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java +++ b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.goraci.generated; @SuppressWarnings("all") diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java index f9eae596e..437422f3b 100644 --- a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java +++ b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.goraci.generated; @SuppressWarnings("all") diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java index 5fa11a8e9..c760b4791 100644 --- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java +++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.tutorial.log.generated; @SuppressWarnings("all") diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java index 7870b927e..cb35686b3 100644 --- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java +++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java @@ -1,7 +1,19 @@ /** - * Autogenerated by Avro + * 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 * - * DO NOT EDIT DIRECTLY + * 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.tutorial.log.generated; @SuppressWarnings("all") From 4cb5a8b4d46e9fc76cd91728855a431ddad2ca34 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 21 Sep 2016 16:21:12 +0530 Subject: [PATCH 4/4] GORA-412 removed @SuppressWarnings(all) from record.vm velocity template --- .../velocity/org/apache/gora/compiler/templates/record.vm | 2 +- .../java/org/apache/gora/examples/generated/Employee.java | 2 +- .../org/apache/gora/examples/generated/ImmutableFields.java | 2 +- .../java/org/apache/gora/examples/generated/Metadata.java | 4 ++-- .../java/org/apache/gora/examples/generated/TokenDatum.java | 2 +- .../examples/java/org/apache/gora/examples/generated/V2.java | 2 +- .../java/org/apache/gora/examples/generated/WebPage.java | 2 +- .../main/java/org/apache/gora/goraci/generated/CINode.java | 2 +- .../main/java/org/apache/gora/goraci/generated/Flushed.java | 2 +- .../org/apache/gora/tutorial/log/generated/MetricDatum.java | 2 +- .../java/org/apache/gora/tutorial/log/generated/Pageview.java | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm b/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm index 3235caa1d..c9f00921a 100644 --- a/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm +++ b/gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm @@ -18,7 +18,7 @@ #if ($schema.getNamespace()) package $schema.getNamespace(); #end -@SuppressWarnings("all") + #if ($schema.getDoc()) /** $schema.getDoc() */ #end diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java index 2941e70bb..6f433300d 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java @@ -16,7 +16,7 @@ * limitations under the License. */ package org.apache.gora.examples.generated; -@SuppressWarnings("all") + public class Employee 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\":\"Employee\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"name\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"dateOfBirth\",\"type\":\"long\",\"default\":0},{\"name\":\"ssn\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"salary\",\"type\":\"int\",\"default\":0},{\"name\":\"boss\",\"type\":[\"null\",\"Employee\",\"string\"],\"default\":null},{\"name\":\"webpage\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"WebPage\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"content\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"parsedContent\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":{}},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"default\":{}},{\"name\":\"headers\",\"type\":[\"null\",{\"type\":\"map\",\"values\":[\"null\",\"string\"]}],\"default\":null},{\"name\":\"metadata\",\"type\":{\"type\":\"record\",\"name\":\"Metadata\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}}]},\"default\":null}]}],\"default\":null}],\"default\":null}"); private static final long serialVersionUID = -6468893522296148608L; diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java index a006929d6..f3ad91a67 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java @@ -15,7 +15,7 @@ * limitations under the License. */ package org.apache.gora.examples.generated; -@SuppressWarnings("all") + /** Record with only immutable or dirtyable fields, used for testing */ public class ImmutableFields 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\":\"ImmutableFields\",\"namespace\":\"org.apache.gora.examples.generated\",\"doc\":\"Record with only immutable or dirtyable fields, used for testing\",\"fields\":[{\"name\":\"v1\",\"type\":\"int\",\"default\":0},{\"name\":\"v2\",\"type\":[{\"type\":\"record\",\"name\":\"V2\",\"fields\":[{\"name\":\"v3\",\"type\":\"int\",\"default\":0}]},\"null\"],\"default\":null}]}"); diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java index 4234d3764..c80d240ce 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java @@ -16,9 +16,9 @@ * limitations under the License. */ package org.apache.gora.examples.generated; -@SuppressWarnings("all") + public class Metadata 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\":\"Metadata\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}}]}"); + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Metadata\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":null}]}"); private static final long serialVersionUID = -7097391446015721734L; /** Enum containing all data bean's fields. */ public static enum Field { diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java index 9133346ba..303684bad 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java @@ -15,7 +15,7 @@ * limitations under the License. */ package org.apache.gora.examples.generated; -@SuppressWarnings("all") + public class TokenDatum 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\":\"TokenDatum\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"count\",\"type\":\"int\",\"default\":0}]}"); private static final long serialVersionUID = -4481652577902636424L; diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java index 5fe939d49..d4820ef07 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java @@ -15,7 +15,7 @@ * limitations under the License. */ package org.apache.gora.examples.generated; -@SuppressWarnings("all") + public class V2 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\":\"V2\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"v3\",\"type\":\"int\",\"default\":0}]}"); private static final long serialVersionUID = -6538763924317658547L; diff --git a/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java b/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java index 8b0a63384..2065ffc65 100644 --- a/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java +++ b/gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java @@ -16,7 +16,7 @@ * limitations under the License. */ package org.apache.gora.examples.generated; -@SuppressWarnings("all") + public class WebPage 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\":\"WebPage\",\"namespace\":\"org.apache.gora.examples.generated\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"content\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"parsedContent\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"headers\",\"type\":[\"null\",{\"type\":\"map\",\"values\":[\"null\",\"string\"]}],\"default\":null},{\"name\":\"metadata\",\"type\":{\"type\":\"record\",\"name\":\"Metadata\",\"fields\":[{\"name\":\"version\",\"type\":\"int\",\"default\":0},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":null}]},\"default\":null},{\"name\":\"byteData\",\"type\":{\"type\":\"map\",\"values\":\"bytes\"},\"default\":{}},{\"name\":\"stringData\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}}],\"default\":null}"); private static final long serialVersionUID = -2829100587222969501L; diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java index dd2138084..2feccd11a 100644 --- a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java +++ b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java @@ -16,7 +16,7 @@ * limitations under the License. */ package org.apache.gora.goraci.generated; -@SuppressWarnings("all") + public class CINode 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\":\"CINode\",\"namespace\":\"org.apache.gora.goraci.generated\",\"fields\":[{\"name\":\"prev\",\"type\":\"long\",\"default\":0},{\"name\":\"client\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"count\",\"type\":\"long\",\"default\":0}]}"); private static final long serialVersionUID = 1014651356631895518L; diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java index 437422f3b..4a552b640 100644 --- a/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java +++ b/gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java @@ -16,7 +16,7 @@ * limitations under the License. */ package org.apache.gora.goraci.generated; -@SuppressWarnings("all") + public class Flushed 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\":\"Flushed\",\"namespace\":\"org.apache.gora.goraci.generated\",\"fields\":[{\"name\":\"count\",\"type\":\"long\",\"default\":0}]}"); private static final long serialVersionUID = -8888031915401438521L; diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java index c760b4791..8bd619019 100644 --- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java +++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java @@ -16,7 +16,7 @@ * limitations under the License. */ package org.apache.gora.tutorial.log.generated; -@SuppressWarnings("all") + public class MetricDatum 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\":\"MetricDatum\",\"namespace\":\"org.apache.gora.tutorial.log.generated\",\"fields\":[{\"name\":\"metricDimension\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0},{\"name\":\"metric\",\"type\":\"long\",\"default\":0}],\"default\":null}"); private static final long serialVersionUID = 8278557845311856507L; diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java index cb35686b3..be0f6e80a 100644 --- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java +++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java @@ -16,7 +16,7 @@ * limitations under the License. */ package org.apache.gora.tutorial.log.generated; -@SuppressWarnings("all") + public class Pageview 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\":\"Pageview\",\"namespace\":\"org.apache.gora.tutorial.log.generated\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0},{\"name\":\"ip\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"httpMethod\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"httpStatusCode\",\"type\":\"int\",\"default\":0},{\"name\":\"responseSize\",\"type\":\"int\",\"default\":0},{\"name\":\"referrer\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"userAgent\",\"type\":[\"null\",\"string\"],\"default\":null}],\"default\":null}"); private static final long serialVersionUID = -6136058768384995982L;