You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by al...@apache.org on 2016/09/22 19:24:56 UTC
[4/7] gora git commit: adding recompiled data beans
adding recompiled data beans
Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/f14dbd4b
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/f14dbd4b
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/f14dbd4b
Branch: refs/heads/master
Commit: f14dbd4be9f0ed0729816466db0a803b1c7598a3
Parents: c103f89
Author: Kevin Ratnasekera <dj...@yahoo.com>
Authored: Sat Sep 17 03:57:30 2016 +0530
Committer: Kevin Ratnasekera <dj...@yahoo.com>
Committed: Sat Sep 17 03:57:30 2016 +0530
----------------------------------------------------------------------
.../gora/examples/generated/Employee.java | 449 +++++++--------
.../examples/generated/ImmutableFields.java | 175 +++---
.../gora/examples/generated/Metadata.java | 179 +++---
.../gora/examples/generated/TokenDatum.java | 113 ++--
.../org/apache/gora/examples/generated/V2.java | 111 ++--
.../apache/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(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/gora/blob/f14dbd4b/gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java
----------------------------------------------------------------------
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 cf3fe97..fc0754e 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\",{\"typ
e\":\"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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
};
public static final String[] _ALL_FIELDS = {
- "name",
- "dateOfBirth",
- "ssn",
- "salary",
- "boss",
- "webpage",
+ "name",
+ "dateOfBirth",
+ "ssn",
+ "salary",
+ "boss",
+ "webpage",
};
/**
@@ -87,29 +77,30 @@ public class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 @@ public class Employee extends org.apache.gora.persistency.impl.PersistentBase im
copy.limit(limit);
return copy.asReadOnlyBuffer();
}
-
+
/**
* RecordBuilder for Employee instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Employee>
- implements org.apache.avro.data.RecordBuilder<Employee> {
+ implements org.apache.avro.data.RecordBuilder<Employee> {
private java.lang.CharSequence name;
private long dateOfBirth;
@@ -313,15 +303,15 @@ public class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 @@ public class Employee extends org.apache.gora.persistency.impl.PersistentBase im
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
}
}
}
-
+
public Employee.Tombstone getTombstone(){
- return TOMBSTONE;
+ return TOMBSTONE;
}
public Employee newInstance(){
@@ -522,150 +512,150 @@ public class Employee extends org.apache.gora.persistency.impl.PersistentBase im
}
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 class Employee extends org.apache.gora.persistency.impl.PersistentBase im
.directBinaryDecoder((java.io.InputStream) in,
null));
}
-
-}
+}
http://git-wip-us.apache.org/repos/asf/gora/blob/f14dbd4b/gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java
----------------------------------------------------------------------
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 f885a58..a006929 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 class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
};
public static final String[] _ALL_FIELDS = {
- "v1",
- "v2",
+ "v1",
+ "v2",
};
/**
@@ -77,22 +77,22 @@ public class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
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 class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
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 class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
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 class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
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 @@ public class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
copy.limit(limit);
return copy.asReadOnlyBuffer();
}
-
+
/**
* RecordBuilder for ImmutableFields instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ImmutableFields>
- implements org.apache.avro.data.RecordBuilder<ImmutableFields> {
+ implements org.apache.avro.data.RecordBuilder<ImmutableFields> {
private int v1;
private org.apache.gora.examples.generated.V2 v2;
@@ -195,15 +195,15 @@ public class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
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 @@ public class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
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 class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
}
}
}
-
+
public ImmutableFields.Tombstone getTombstone(){
- return TOMBSTONE;
+ return TOMBSTONE;
}
public ImmutableFields newInstance(){
@@ -285,58 +285,58 @@ public class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
}
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 class ImmutableFields extends org.apache.gora.persistency.impl.Persistent
}
}
-
http://git-wip-us.apache.org/repos/asf/gora/blob/f14dbd4b/gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java
----------------------------------------------------------------------
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 a603c45..d332693 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 class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
};
public static final String[] _ALL_FIELDS = {
- "version",
- "data",
+ "version",
+ "data",
};
/**
@@ -65,22 +65,22 @@ public class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
private int version;
private java.util.Map<java.lang.CharSequence,java.lang.CharSequence> 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<java.lang.CharSequence,java.lang.CharSequence>)((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<java.lang.CharSequence,java.lang.CharSequence>)((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 class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
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 class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
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 class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
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 @@ public class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
copy.limit(limit);
return copy.asReadOnlyBuffer();
}
-
+
/**
* RecordBuilder for Metadata instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Metadata>
- implements org.apache.avro.data.RecordBuilder<Metadata> {
+ implements org.apache.avro.data.RecordBuilder<Metadata> {
private int version;
private java.util.Map<java.lang.CharSequence,java.lang.CharSequence> data;
@@ -183,15 +183,15 @@ public class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
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 @@ public class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
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<java.lang.CharSequence,java.lang.CharSequence> getData() {
return data;
}
-
+
/** Sets the value of the 'data' field */
public org.apache.gora.examples.generated.Metadata.Builder setData(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> 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 class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
}
}
}
-
+
public Metadata.Tombstone getTombstone(){
- return TOMBSTONE;
+ return TOMBSTONE;
}
public Metadata newInstance(){
@@ -273,58 +273,58 @@ public class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
}
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<java.lang.CharSequence,java.lang.CharSequence> 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<java.lang.CharSequence,java.lang.CharSequence> 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<java.lang.CharSequence,java.lang.CharSequence> 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<java.lang.CharSequence,java.lang.CharSequence> 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 class Metadata extends org.apache.gora.persistency.impl.PersistentBase im
}
}
-
http://git-wip-us.apache.org/repos/asf/gora/blob/f14dbd4b/gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java
----------------------------------------------------------------------
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 7b09d13..9133346 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 class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
};
public static final String[] _ALL_FIELDS = {
- "count",
+ "count",
};
/**
@@ -73,20 +73,20 @@ public class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
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 class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
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 class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
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 @@ public class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
copy.limit(limit);
return copy.asReadOnlyBuffer();
}
-
+
/**
* RecordBuilder for TokenDatum instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<TokenDatum>
- implements org.apache.avro.data.RecordBuilder<TokenDatum> {
+ implements org.apache.avro.data.RecordBuilder<TokenDatum> {
private int count;
@@ -164,15 +164,15 @@ public class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
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 @@ public class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
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 class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
}
}
}
-
+
public TokenDatum.Tombstone getTombstone(){
- return TOMBSTONE;
+ return TOMBSTONE;
}
public TokenDatum newInstance(){
@@ -224,35 +224,35 @@ public class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
}
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 class TokenDatum extends org.apache.gora.persistency.impl.PersistentBase
.directBinaryDecoder((java.io.InputStream) in,
null));
}
-
-}
+}
http://git-wip-us.apache.org/repos/asf/gora/blob/f14dbd4b/gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java
----------------------------------------------------------------------
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 64f85f5..5fe939d 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 class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
};
public static final String[] _ALL_FIELDS = {
- "v3",
+ "v3",
};
/**
@@ -73,20 +73,20 @@ public class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
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 class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
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 class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
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 @@ public class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
copy.limit(limit);
return copy.asReadOnlyBuffer();
}
-
+
/**
* RecordBuilder for V2 instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<V2>
- implements org.apache.avro.data.RecordBuilder<V2> {
+ implements org.apache.avro.data.RecordBuilder<V2> {
private int v3;
@@ -164,15 +164,15 @@ public class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
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 @@ public class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
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 class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
}
}
}
-
+
public V2.Tombstone getTombstone(){
- return TOMBSTONE;
+ return TOMBSTONE;
}
public V2 newInstance(){
@@ -224,35 +224,35 @@ public class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
}
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 class V2 extends org.apache.gora.persistency.impl.PersistentBase implemen
}
}
-