Sorry, but has a bit much. Just putting the properties, not the getter/setter and other methods.
Code:
@NodeEntity
public class Event implements Serializable, SocialMessageArg {
public static final String LOCATION_OF_EVENT = "LOCATION_OF_EVENT";
public static final String ITEMS_NEEDED_FOR_EVENT = "ITEMS_NEEDED_FOR_EVENT";
private static final String TITLE_INDEX = "title";
private static final String DESCRIPTION_INDEX = "eventDescription";
private static final String EVENT_DATE_INDEX = "eventDate";
private static final String VISIBILITY_INDEX = "visibility";
@GraphId
private Long nodeId;
@NotNull
@Future
@Temporal(TemporalType.DATE)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
@JsonSerialize(using= JsonLongDateSerializer.class)
@Indexed(indexName = EVENT_DATE_INDEX, indexType = IndexType.SIMPLE)
private Date eventDate;
private String eventTime;
@NotNull
@Indexed(indexName = TITLE_INDEX, indexType = IndexType.FULLTEXT)
private String title;
@Indexed(indexName = DESCRIPTION_INDEX, indexType = IndexType.FULLTEXT)
private String description;
@RelatedTo(type=LOCATION_OF_EVENT)
@Fetch
private Location location;
//@Indexed(indexType = IndexType.POINT, indexName = "eventLocation")
String wkt;
@Indexed(indexName = VISIBILITY_INDEX)
private EventVisibility visibility = EventVisibility.PUBLIC;
// For things like Twitter hash codes.
private String eventHash;
@RelatedTo(type = User.HOSTING, direction = Direction.INCOMING)
@Fetch
private Set<User> eventHosts;
@RelatedTo(type = User.ATTENDING, direction = Direction.INCOMING)
@JsonIgnore
private Set<User> attendees;
@RelatedTo(type = User.INVITED)
@JsonIgnore
private Set<User> invitedGuests;
@RelatedToVia(type = ITEMS_NEEDED_FOR_EVENT)
@Fetch
private Set<ItemNeededForEvent> itemsNeededForEvent;
@RelatedTo(type = ItemUserIsBringingToEvent.EVENT_FOR_ITEM_BROUGHT, direction = Direction.INCOMING)
@JsonIgnore
private Set<ItemUserIsBringingToEvent> itemsBringingToEvent;
@RelatedTo(type = ItemUserSignedUpToBringToEvent.EVENT_SIGNED_UP_FOR_ITEM, direction = Direction.INCOMING)
@JsonIgnore
@Fetch
private Set<ItemUserSignedUpToBringToEvent> itemsSignedUpToEvent;
@Transient
private Boolean editable = false;
public Event() {}