<< 17-July-2008 : hausbot on #castor at codehaus [download] [back] >>
 
 
time nick message

17:14

<ralf>

hi udai

17:15

<ralf>

do you have any questions apart of review of your code

17:15

<ralf>

i will not be available this evening

17:17

<ralf>

bye

17:17

<Udai>

k

17:17

<Udai>

hi

17:17

<ralf>

hi

17:17

<Udai>

one min

17:17

<ralf>

okay

17:17

<Udai>

I want to ask few things

17:18

<Udai>

I was working at the condition package

17:18

<Udai>

and I want to know how the interface will be used to set a condition

17:18

<Udai>

would it be like this

17:19

<Udai>

creating a new condition

17:19

<Udai>

and then add AND and OR compoundcondition into that _condtion list

17:20

<ralf>

on a Expression you have factory methods to create a Condition

17:20

<Udai>

because I didn't saw any method in interface to initialize the condition

17:20

<Udai>

k

17:20

<ralf>

e.g. expression.isNull()

17:21

<ralf>

or expression.greaterThan(5)

17:21

<ralf>

on a Condition you have factory methods to combine them

17:21

<Udai>

that is add

17:22

<ralf>

e.g. expression.isNull().or(expression.greaterThan(5))

17:22

<Udai>

but I want to know how user will initialize the _condition list from selectImpl

17:22

<ralf>

he will not initialize it

17:23

<Udai>

k

17:23

<Udai>

he will write those as expression

17:23

<ralf>

it has to be initialized at construction or lazy on demand

17:23

<Udai>

so I will be implementing these methods in AbstractExpresion

17:24

<ralf>

that is the idea

17:25

<Udai>

one more thing

17:25

<Udai>

SelectQuery select = QueryFactory.newSelectQuery(); Schema schema = select.newSchema(Foo.class, "o"); select.addSchema(schema);

17:25

<Udai>

after this

17:26

<Udai>

how expression is going to be related with select

17:27

<Udai>

how would selectImpl refer to that expression

17:27

<ralf>

Schema extends Expression

17:27

<ralf>

so you can do the following

17:28

<ralf>

Field field = schema.field("position");

17:29

<ralf>

Condition condition = field.isNull().or(field.greaterThan(5));

17:29

<ralf>

select.setWhere(condition);

17:29

<Udai>

those lines will be used by user

17:30

<Udai>

creating the Field and Condition and then setWhere

17:30

<ralf>

select.addProjection(schema);

17:30

<ralf>

this will produce

17:30

<Udai>

schema instance

17:31

<Udai>

no

17:31

<ralf>

select o from Foo as o where (o.position is null) or (o.position>5)

17:31

<Udai>

ya

17:31

<Udai>

okay

17:31

<Udai>

thanks

17:32

<ralf>

i think this is quite simple to use

17:32

<Udai>

so you will be going off for today

17:32

<ralf>

yes, i meet with some friends

17:32

<Udai>

okay

17:32

<Udai>

see you tomorrow

17:32

<ralf>

see you

17:33

<ralf>

bye

17:33

<Udai>

bbye

Drone v1.4 © 2002-2005 Uwyn RIFE powered