1

Currently, I can instruct Hyberjaxb to not persist a node in a xml object at compile time using the transient functionality. Is there anyway of applying this dynamically at runtime? If x=y, then persist particular node in xml object, otherwise do not persist.

Is there perhaps another strategy to deal with this?

chown
  • 51,908
  • 16
  • 134
  • 170
xchagger
  • 133
  • 1
  • 9

1 Answers1

1

I don't think this is a task for Hyperjaxb, since HJ is primarily a compile-time tool. There's a very limited runtime impact only.

Would it be enought to make a deep-copy of the object structure and then remove what you dont' want to be marshalled? You can use something like copyable plugin to generate nice copy/clone methods or even use a custom copy strategy.

lexicore
  • 42,748
  • 17
  • 132
  • 221
  • Yes, I am trying to force a compile tool to make runtime decisions, which is not its intended purpose. Thanks. – xchagger Sep 19 '11 at 13:37