/** * This method should be called only if it has been determined that table schema should be created * (or deleted). Create the {@link CustomObject} for the metadata API to use during deploy * * @param cmd the class metadata for the entity * @param storeManager the store manager * @param mconn the managed connection that contains connections to the Force.com APIs */ public void createCustomObject( AbstractClassMetaData cmd, ForceStoreManager storeManager, ForceManagedConnection mconn) { String shortName = removeCustomThingSuffix(tableImpl.getTableName().getName()); if (isReadOnlyTable) { throw new NucleusUserException("Cannot create readOnlySchema custom object: " + shortName); } createCustomObjectStub(); customObject.setDescription(shortName + ": Persistenceforce created custom object"); customObject.setDeploymentStatus(DeploymentStatus.Deployed); customObject.setSharingModel(SharingModel.ReadWrite); customObject.setLabel(shortName); customObject.setPluralLabel(shortName); CustomField nf = new CustomField(); nf.setType(FieldType.Text); nf.setLabel("name"); nf.setFullName("name"); nf.setDescription("name"); customObject.setNameField(nf); Map<String, String> classExtensions = PersistenceUtils.getForceExtensions(cmd); String value = classExtensions.get("enableFeeds"); if (value != null) { customObject.setEnableFeeds(Boolean.valueOf(value)); } }