Foren
Change type of sevice model attributes
Zachary Mayry, geändert vor 7 Jahren.
Change type of sevice model attributes
New Member Beiträge: 14 Beitrittsdatum: 24.02.17 Neueste Beiträge
I have this package myservice.service.model.impl
with mytableImpl.java
and mytableModelImpl.java
mytableModelImpl.java has the attributes with type Date given by the service builder
I want it to be of type LocalDate but I can't edit mytableModelImpl.java directly and says to use mytableImpl.java
Is this doable?
with mytableImpl.java
and mytableModelImpl.java
mytableModelImpl.java has the attributes with type Date given by the service builder
I want it to be of type LocalDate but I can't edit mytableModelImpl.java directly and says to use mytableImpl.java
Is this doable?
David H Nebinger, geändert vor 7 Jahren.
RE: Change type of sevice model attributes
Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
No, ServiceBuilder uses a known set of types and you cannot just change them.
You can go into mytableModelImpl and add supporting methods such as getLocalDate() that perhaps does an internal conversion on the actual Date field value to return what you need and a setLocalDate() method which receives the local date and transforms to store in the actual Date field value.
You can go into mytableModelImpl and add supporting methods such as getLocalDate() that perhaps does an internal conversion on the actual Date field value to return what you need and a setLocalDate() method which receives the local date and transforms to store in the actual Date field value.