@Bean(scope = DefaultScopes.SINGLETON)
public List<CrudManagedObject> managedObjects() {
if (managedObjects == null) {
managedObjects = new ArrayList<CrudManagedObject>();
CrudManagedObject crudManagedObject = CrudManagedObject.createWithPropertiesAndDAO(Employee.class,
EmployeeDAO.class, "firstName","lastName","status","active","dob","age","phone","department.name","address.zipCode", "address.line1", "address.line2");
//crudManagedObject.setTransactionalController(true);
managedObjects.add(crudManagedObject);
managedObjects.add(new CrudManagedObject(Department.class,
DepartmentDAO.class));
managedObjects.add(new CrudManagedObject(Specialty.class,
SpecialtyDAO.class));
managedObjects.add(new CrudManagedObject(Tag.class,
TagDAO.class));
managedObjects.add(new CrudManagedObject(Category.class));
managedObjects.add(new CrudManagedObject(PetClinicInquiry.class));
managedObjects.add(new CrudManagedObject(Inquiry.class));
managedObjects.add(new CrudManagedObject(PetClinicLead.class));
managedObjects.add(new CrudManagedObject(Task.class));
crudManagedObject = new CrudManagedObject(Role.class, RoleDAO.class);
crudManagedObject.setNewSelect("new Role(o.id, o.name)");
managedObjects
.add(crudManagedObject);
managedObjects.add(new CrudManagedObject(Skill.class, null));
try {
dataTableScrollerBean();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
//Spring Security Managed Objects
managedObjects.add(new CrudManagedObject(Users.class, UsersDAO.class));
managedObjects.add(new CrudManagedObject(Authorities.class, AuthoritiesDAO.class));
managedObjects.add(new CrudManagedObject(GroupAuthorities.class, GroupAuthoritiesDAO.class));
managedObjects.add(new CrudManagedObject(Groups.class, GroupsDAO.class));
managedObjects.add(new CrudManagedObject(GroupMembers.class, GroupMembersDAO.class));
return managedObjects;
}