public class FactImpl extends Object implements Fact, Externalizable
Constructor and Description |
---|
FactImpl() |
FactImpl(FactTemplate template,
long id) |
FactImpl(FactTemplate template,
Object[] values,
long id)
this is the default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
long |
getFactId()
Return the long factId
|
FactTemplate |
getFactTemplate()
Return the deftemplate for the fact
|
Object |
getFieldValue(int index)
Method returns the value of the given slot at the
id.
|
Object |
getFieldValue(String name) |
int |
hashCode() |
void |
readExternal(ObjectInput in) |
protected void |
resetId(Fact fact)
this is used to reset the id, in the event an user tries to
assert the same fact again, we reset the id to the existing one.
|
void |
setFieldValue(int index,
Object value) |
void |
setFieldValue(String name,
Object value) |
void |
writeExternal(ObjectOutput out) |
public FactImpl()
public FactImpl(FactTemplate template, Object[] values, long id)
instance
- values
- public FactImpl(FactTemplate template, long id)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public Object getFieldValue(int index)
getFieldValue
in interface Fact
id
- public Object getFieldValue(String name)
getFieldValue
in interface Fact
public void setFieldValue(String name, Object value)
setFieldValue
in interface Fact
public void setFieldValue(int index, Object value)
setFieldValue
in interface Fact
public long getFactId()
protected void resetId(Fact fact)
fact
- public FactTemplate getFactTemplate()
getFactTemplate
in interface Fact
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.