* Creates a new Custom Object for the specified entity, inserts it into the receiver using <code>insertSavedObject</code>, and returns the new object.
* @param anEntityName the name of entity
*/
public EOCustomObject createSavedObject(final String anEntityName) {
EOEntity entity = EOUtilities.entityNamed(this, anEntityName);
EOEnterpriseObject object = entity.classDescriptionForInstances().createInstanceWithEditingContext(this, null);
if (!(object instanceof EOCustomObject))
throw new IllegalArgumentException("The entity is not an EOCustomObject and can't be used with createSavedObject().");
insertSavedObject((EOCustomObject)object);
return (EOCustomObject)object;
}