Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Created April 7, 2016 03:36
Show Gist options
  • Select an option

  • Save cosbor11/194a889b594ecb28d0f8ac97deb5caae to your computer and use it in GitHub Desktop.

Select an option

Save cosbor11/194a889b594ecb28d0f8ac97deb5caae to your computer and use it in GitHub Desktop.
Define a CallLog entity and its partition areaCode
@Entity
public class CallLog extends ManagedEntity implements IManagedEntity
{
@Attribute
@Identifier(generator = IdentifierGenerator.SEQUENCE)
protected long callLogId;
@Attribute
protected String destinationNumber;
@Attribute
protected Date timeDateStarted;
@Index
@Attribute
protected boolean isNSAListening;
@Relationship(type = RelationshipType.MANY_TO_ONE,
inverseClass = CellPhone.class,
inverse = "callLogs",
cascadePolicy = CascadePolicy.NONE,
fetchPolicy = FetchPolicy.NONE)
protected CellPhone callFrom;
@Attribute
@Partition
protected int callFromAreaCode;
// getters and setters
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment