Skip to content

Commit

Permalink
Rename HBaseEntity to HEntity for consistency with other annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ghelmling committed Feb 12, 2010
1 parent 5df1302 commit 54131ce
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Inherited
public @interface HBaseEntity {
public @interface HEntity {
String name();
}
4 changes: 2 additions & 2 deletions src/java/meetup/beeno/mapping/EntityInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.Map;
import java.util.Set;

import meetup.beeno.HBaseEntity;
import meetup.beeno.HEntity;
import meetup.beeno.HIndex;
import meetup.beeno.HProperty;
import meetup.beeno.HRowKey;
Expand Down Expand Up @@ -40,7 +40,7 @@ public EntityInfo(Class clazz) {
public Class getEntityClass() { return this.entityClass; }

/**
* Returns the HBase table identified by the entity's {@link HBaseEntity}
* Returns the HBase table identified by the entity's {@link HEntity}
* annotation.
* @return
*/
Expand Down
6 changes: 3 additions & 3 deletions src/java/meetup/beeno/mapping/EntityMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import meetup.beeno.HBaseEntity;
import meetup.beeno.HEntity;
import meetup.beeno.HProperty;
import meetup.beeno.HRowKey;

Expand All @@ -19,7 +19,7 @@

/**
* Central cache for parsed mapping metadata on entity classes. Given an entity class reference,
* this will parse out {@link HBaseEntity}. {@link HRowKey}, {@link HProperty} annotations for the class
* this will parse out {@link HEntity}. {@link HRowKey}, {@link HProperty} annotations for the class
* and cache the results for future queries.
*
* @author garyh
Expand Down Expand Up @@ -80,7 +80,7 @@ public EntityInfo getInfo(Class entityClass) throws MappingException {
*/
protected EntityInfo parseEntity(Class clazz) throws MappingException {
// lookup any class mappings
HBaseEntity classTable = (HBaseEntity) clazz.getAnnotation(HBaseEntity.class);
HEntity classTable = (HEntity) clazz.getAnnotation(HEntity.class);
if (classTable == null) {
throw new MappingException(clazz, "Not an entity class!");
}
Expand Down
14 changes: 7 additions & 7 deletions test/java/meetup/beeno/TestEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Map;
import java.util.Set;

import meetup.beeno.HBaseEntity;
import meetup.beeno.HEntity;
import meetup.beeno.HIndex;
import meetup.beeno.HProperty;
import meetup.beeno.HRowKey;
Expand All @@ -25,7 +25,7 @@ public class TestEntities {
* @author garyh
*
*/
@HBaseEntity(name="test_simple")
@HEntity(name="test_simple")
public static class SimpleEntity {
String id;
String stringProperty;
Expand Down Expand Up @@ -94,7 +94,7 @@ public void setLongProperty( long longProperty ) {
* More complex entity class containing mapped collections
* @author garyh
*/
@HBaseEntity(name="test_complex")
@HEntity(name="test_complex")
public static class ComplexEntity {
String id;
List<String> stringList = new ArrayList<String>();
Expand Down Expand Up @@ -134,7 +134,7 @@ public void setExtendedProps(Map<String,String> props) {
}
}

@HBaseEntity(name="test_nokey")
@HEntity(name="test_nokey")
public static class NoKeyEntity {
String prop1;

Expand All @@ -143,7 +143,7 @@ public static class NoKeyEntity {
public void setProp1(String prop) { this.prop1 = prop; }
}

@HBaseEntity(name="test_dupekey")
@HEntity(name="test_dupekey")
public static class DupeKeyEntity {
String id1;
String id2;
Expand All @@ -154,7 +154,7 @@ public static class DupeKeyEntity {
public String getId2() { return this.id2; }
}

@HBaseEntity(name="test_dupefield")
@HEntity(name="test_dupefield")
public static class DupeFieldEntity {
String id;
String prop1;
Expand All @@ -173,7 +173,7 @@ public static class DupeFieldEntity {
* @author garyh
*
*/
@HBaseEntity(name="test_indexed")
@HEntity(name="test_indexed")
public static class IndexedEntity {
String id;
String stringProperty;
Expand Down

0 comments on commit 54131ce

Please sign in to comment.