public class Test2 extends Object implements StandardCBRApplication
enum AccommodationTypes { OneStar, TwoStars, ThreeStars, HolidayFlat, FourStars, FiveStars};for the accomodation attribute. To manage that attribute we only have to modify the TravelDescription.hbm.xml with the following code:
... <property name="Accommodation" column="Accommodation"> <type name="es.ucm.fdi.gaia.jcolibri.connector.databaseutils.EnumUserType"> <param name="enumClassName">es.ucm.fdi.gaia.jcolibri.test.test2.TravelDescription$AccommodationTypes</param> </type> </property> ...The EnumUserType class is a utility class of the connector that allows managing Enums. It recieves the class name of you enum as parameter.
<property name="Hotel" column="Hotel"> <type name="es.ucm.fdi.gaia.jcolibri.connector.databaseutils.GenericUserType"> <param name="className">es.ucm.fdi.gaia.jcolibri.test.test2.MyStringType</param> </type> </property>The GenericUserType class is the utility class that allows to manage TypeAdaptor implementations in the data base connector.
jcolibri.connector.TypeAdaptor
,
TravelDescription
,
MyStringType
Constructor and Description |
---|
Test2() |
Modifier and Type | Method and Description |
---|---|
void |
configure() |
void |
cycle(CBRQuery query) |
static void |
main(String[] args) |
void |
postCycle() |
CBRCaseBase |
preCycle() |
public Test2()
public void configure() throws ExecutionException
configure
in interface StandardCBRApplication
ExecutionException
public CBRCaseBase preCycle() throws ExecutionException
preCycle
in interface StandardCBRApplication
ExecutionException
public void cycle(CBRQuery query) throws ExecutionException
cycle
in interface StandardCBRApplication
ExecutionException
public void postCycle() throws ExecutionException
postCycle
in interface StandardCBRApplication
ExecutionException
Copyright © 2018 Group of Artificial Intelligence Applications (GAIA). All rights reserved.