public class PredicateConfig extends Object implements IdentifiedDataSerializable
Predicate
. The configuration contains either the class name
of the Predicate implementation, or the actual Predicate instance.Modifier and Type | Field and Description |
---|---|
protected String |
className |
protected Predicate |
implementation |
protected String |
sql |
Constructor and Description |
---|
PredicateConfig()
Creates a PredicateConfig without className/implementation.
|
PredicateConfig(Predicate implementation)
Creates a PredicateConfig with the given implementation.
|
PredicateConfig(PredicateConfig config) |
PredicateConfig(String className)
Creates a PredicateConfig with the given className.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
PredicateConfig |
getAsReadOnly()
Deprecated.
this method will be removed in 4.0; it is meant for internal usage only
|
String |
getClassName()
Returns the name of the class of the Predicate.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
Predicate |
getImplementation()
Returns the Predicate implementation.
|
String |
getSql()
Returns sql string for this config.
|
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
PredicateConfig |
setClassName(String className)
Sets the class name of the Predicate.
|
PredicateConfig |
setImplementation(Predicate implementation)
Sets the Predicate implementation.
|
void |
setSql(String sql)
Sets sql string for this config.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
protected String className
protected String sql
protected Predicate implementation
public PredicateConfig()
public PredicateConfig(String className)
className
- the name of the Predicate classIllegalArgumentException
- if className is null
or an empty Stringpublic PredicateConfig(PredicateConfig config)
public PredicateConfig(Predicate implementation)
implementation
- the implementation to use as PredicateIllegalArgumentException
- if the implementation is null
public PredicateConfig getAsReadOnly()
public String getClassName()
null
is returned.setClassName(String)
public PredicateConfig setClassName(String className)
If a implementation or sql was set, it will be removed.
className
- the name of the class of the PredicateIllegalArgumentException
- if className is null
or an empty StringsetImplementation(Predicate)
,
getClassName()
public Predicate getImplementation()
null
is returned.setImplementation(Predicate)
public PredicateConfig setImplementation(Predicate implementation)
If a className or sql was set, it will be removed.
implementation
- the Predicate implementationIllegalArgumentException
- the implementation is null
setClassName(String)
,
getImplementation()
public String getSql()
public void setSql(String sql)
If a className or implementation was set, it will be removed.
sql
- sql string for this configpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.