Standard Mappings Usage Sample
//Create a com.softwareag.centrasite.appl.framework.beans.standard.Organization
com.softwareag.centrasite.appl.framework.beans.standard.Organization
organization = beanPool.create(com.softwareag.centrasite.appl.framework.beans.s
tandard.Organization.class);
organization.setName("MyOrganization");
// Create StandardMappingManager for managing Standard non RegistryObjects
// mappings
StandardMappingManager smm = new StandardMappingManager(registryProvider);
//Create a postal address
com.softwareag.centrasite.appl.framework.beans.standard.PostalAddress pa =
smm.createPostalAddress("streetNumber", "street", "city",
"stateOrProvince", "country", "postalCode","type");
organization.setPostalAddress(pa);
// Get existing user and add it to the organization
com.softwareag.centrasite.appl.framework.beans.standard.User user =
beanPool.read( com.softwareag.centrasite.appl.framework.beans.standard.User.class,
USER_KEY);
Collection<User> users = new ArrayList<User>();
users.add(user);
organization.setUsers(users);
// save the changes
beanPool.flush();