An useful example for initial value (but it�s not your real necessity), is
in case of relationship. You can override the %OnNew method, like this:

Method %OnNew(initvalue As %CacheString) As %Status [ Private,
ProcedureBlock = 1 ] {
    Do ..<PropertyName>SetObjectId(id)
    Quit $system.Status.OK()
}

Where <PropertyName> is the property you want to set the default initial
value and "id" is the ID relationed to that property

Leonardo



"ibbi" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> with JAVA, i've got the resultSet from Database.
> and i want to assign their values to the object that i defined.
>
> But in some column values that are defined as %String and 'not required'
> comes as null object.
> it makes runtime exceptions.
>
> i want to set the initial value "" if the property is null.
> Adding 'if statement' in java code for every properties works, but it's
too
> wasty.
>
> What can i do to set the default value?
>
>



Reply via email to