Hi James,

You can use reflection to call that entity’s static method. You just need to 
discover the corresponding class name for that entity in the first place.

String entityName = "YourEntityName";

EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);

Class<?> clazz = Class.forName(entity.className());

Method method = clazz.getMethod("yourStaticMethodName");

method.invoke(null);

Is that what you want?

Cheers,

Henrique

> On 09/12/2014, at 13:37, James Cicenia <ja...@jimijon.com> wrote:
> 
> 
> I have a string that is an EntityName.
> I want to run that entity’s static class method.
> 
> do I have to do this?:
> 
>         EOEnterpriseObject myClass = EOUtilities.createAndInsertInstance( ec, 
> entityName) ;
> 
> I really don’t want to create an instance.
> 
> Thanks
> James
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com
> 
> This email sent to hpra...@gmail.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to