Foros de discusión
Change type of sevice model attributes
Zachary Mayry, modificado hace 7 años.
Change type of sevice model attributes
New Member Mensajes: 14 Fecha de incorporación: 24/02/17 Mensajes recientes
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, modificado hace 7 años.
RE: Change type of sevice model attributes
Liferay Legend Mensajes: 14917 Fecha de incorporación: 2/09/06 Mensajes recientes
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.