Adding Logic to Enterprise Objects
Now, let's take a closer look at the way we have modeled the Post entity.
The timestamp attribute is exactly that, a timestamp. It is not meant to be a random date or one that you can set. It is to mark the time and date when a post is made. As such we can automate this. But to do that we have to write our first bit of Enterprise Objects logic. (You might have noticed that so far, we have developed basically a codeless application.)
Creating a Custom Class for Enterprise Objects
Until now, entities have been informally referred to as classes, so that it would be easier to conceptualize.
In reality, however, they don't have to be separate classes. Each of our Enterprise Objects uses a generic class to draw their ...
Get WebObjects® Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.