Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Last active April 7, 2016 04:12
Show Gist options
  • Select an option

  • Save cosbor11/96f7bb36daa4873b3129af0380e053f5 to your computer and use it in GitHub Desktop.

Select an option

Save cosbor11/96f7bb36daa4873b3129af0380e053f5 to your computer and use it in GitHub Desktop.
Create an entity to model the effects of a beverage including event listeners.
@Entity
public class BeverageEffects extends ManagedEntity implements IManagedEntity
{
public BeverageEffects()
{
}
protected Beverage beverage;
public BeverageEffects(Beverage beverage)
{
this.beverage = beverage;
}
@Identifier(generator = IdentifierGenerator.SEQUENCE)
@Attribute
protected long behaviorId;
@Attribute
protected String description;
// Getters and setters
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment