package org.apache.cayenne.testdo.inheritance_flat.auto; import java.util.List; import org.apache.cayenne.CayenneDataObject; import org.apache.cayenne.exp.Property; import org.apache.cayenne.testdo.inheritance_flat.Group; /** * Class _Role was generated by Cayenne. * It is probably a good idea to avoid changing this class manually, * since it may be overwritten next time code is regenerated. * If you need to make any customizations, please use subclass. */ public abstract class _Role extends CayenneDataObject { private static final long serialVersionUID = 1L; public static final String ID_PK_COLUMN = "id"; public static final Property<Long> ID = Property.create("id", Long.class); public static final Property<String> NAME = Property.create("name", String.class); public static final Property<Integer> TYPE = Property.create("type", Integer.class); public static final Property<List<Group>> ROLE_GROUPS = Property.create("roleGroups", List.class); public void setId(long id) { writeProperty("id", id); } public long getId() { Object value = readProperty("id"); return (value != null) ? (Long) value : 0; } public void setName(String name) { writeProperty("name", name); } public String getName() { return (String)readProperty("name"); } public void setType(int type) { writeProperty("type", type); } public int getType() { Object value = readProperty("type"); return (value != null) ? (Integer) value : 0; } public void addToRoleGroups(Group obj) { addToManyTarget("roleGroups", obj, true); } public void removeFromRoleGroups(Group obj) { removeToManyTarget("roleGroups", obj, true); } @SuppressWarnings("unchecked") public List<Group> getRoleGroups() { return (List<Group>)readProperty("roleGroups"); } protected abstract void onPostPersist(); protected abstract void onPostUpdate(); }