On 29 December 2014 at 13:23, GESCONSULTOR - Óscar Bou <
[email protected]> wrote:

>
>
> *** @Property  ***
>
> - I would propose to rename "notPersisted" to "transient".
>

I'm slowly trying to eradicate the notion of "transient" objects from the
framework... they are a left over from the old client/server
implementations, and I think that view models make them reduncant.

But "notPersisted" might not be the right name either.

The current @NotPersisted annotation (=NotPersistedFacet) is basically a
hint as to how Isis should process object graphs.  It's used to determine:
- whether a changed property should be audited (ignore those that are
NotPersisted)
- whether a property of a view model should be used as part of its memento
(for @ViewModel)
- to determine if a property should be part of an internal memento (not to
be confused with the MementoService) of an object's state (I think the
Wicket viewer does use this in one place)
- for the old persistence-by-reachability stuff (probably superfluous now
that we use JDO)
- how to remap aggregated objects if parent changed (not sure if that
functionality is used by JDO, probably not)

So maybe "traversable" might be a better name (default = true)



> - Also, not sure about the exact meaning of "regexPatternFlags". Should it
> be an Enum?
>

per response to Jeroen, it's the flag to Pattern.compile.

http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#compile(java.lang.String,%20int)



> - I misunderstood "cardinality". I always associated it with a "number".
> Perhaps a better name could be "isMandatory" with a "TRUE | FALSE |
> DEFAULT" enum associated to its value? Another alternative could be
> "persisting" and default values "DEFAULT | OPTIONAL | MANDATORY". Or, in
> order to be more generic (for example, to use the same name on the
> @Parameter annotation, it could be something like "required".
>
>
I struggled with this... I think that "Cardinality" can be used in this
way, but I see that wikipedia has a disambiguation page for the term, so
it's likely to confuse others too.

Given that we've historically used @Optional, perhaps it should be called
optional = TRUE|FALSE|DEFAULT.   Also in JDO we write
@javax.jdo.Column(allowNulls="true") so I think it'd be better to see
@Property(optional=TRUE) rather than @Property(mandatory=FALSE).



>
> *** @Parameter  ***
>
> - Same as @Property. I suggest to rename "cardinality" to "required".
>
>
>
same comment; change to @Parameter(optional=TRUE|FALSE).  Javadoc to say
that "DEFAULT" shouldn't be used (but is a synonym for FALSE).


Thx again
Dan




>
> HTH,
>
> Oscar
>
>
>

Reply via email to