• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom attribute class conversion in entity modeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom attribute class conversion in entity modeler


  • Subject: Re: Custom attribute class conversion in entity modeler
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Mon, 09 Feb 2009 12:02:57 -0500


On Feb 8, 2009, at 6:50 AM, Riccardo De Menna wrote:

public static enum Status {
ACTIVE(0),
DISABLED(1),
TRIAL(2),
DELETED(-2);
private static final Map<Integer,Status> lookup = new HashMap<Integer,Status>();
public static Status forID(int id) { return lookup.get(id); }
private final int _id;
private Status(int id) { _id = id; }
public int id() { return _id; }
static {
for( Status s : EnumSet.allOf(Status.class) )
lookup.put(s.id(), s);
}
}


Hi Riccardo,

Could you share what your EOAttribute looks like in the eomodeld for this status attribute.  For example, I have one that is stored as a string in the database and mine looks as follows:

        {

            allowsNull = N; 

            columnName = "STATUS"; 

            externalType = VARCHAR2; 

            width = 20;

            name = status; 

            valueClassName = "com.mpv.contractanalysis.ContractAnalysisStatus"; 

            adaptorValueConversionMethodName = name;

            factoryMethodArgumentType = EOFactoryMethodArgumentIsNSString;

            valueFactoryMethodName = valueOf;

        }, 


I would imagine that for your attribute, the adaptorValueConversionMethodName is id.  I'm interested in what your factoryMethodArgumentType and valueFactoryMethodName are set with.

Thanks,
Ricardo J. Parada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Custom attribute class conversion in entity modeler (From: Riccardo De Menna <email@hidden>)
 >Re: Custom attribute class conversion in entity modeler (From: Mike Schrag <email@hidden>)
 >Re: Custom attribute class conversion in entity modeler (From: Riccardo De Menna <email@hidden>)
 >Re: Custom attribute class conversion in entity modeler (From: Mike Schrag <email@hidden>)
 >Re: Custom attribute class conversion in entity modeler (From: Riccardo De Menna <email@hidden>)

  • Prev by Date: BLOB, WO 5.4, oracle 9i, ojdbc14 - no go
  • Next by Date: MEETING: Chicago CocoaHeads / CAWUG Tuesday Feb 10th
  • Previous by thread: Re: Custom attribute class conversion in entity modeler
  • Next by thread: Re: Custom attribute class conversion in entity modeler
  • Index(es):
    • Date
    • Thread