public final class CQLMapper extends Object
<cqlMapper>
<cql id="findAccountById">select * from account where id=1</cql>
<cql id="updateAccountNameById">update account set name=? where id=?</cql>
</cqlMapper>
Modifier and Type | Field and Description |
---|---|
static String |
CQL
The Constant CQL.
|
static String |
CQL_MAPPER
The Constant CQL_MAPPER.
|
static String |
ID
The Constant ID.
|
Constructor and Description |
---|
CQLMapper()
Instantiates a new CQL mapper.
|
CQLMapper(String filePath)
Instantiates a new CQL mapper.
|
Modifier and Type | Method and Description |
---|---|
NamedCQL |
add(String id,
NamedCQL namedCQL)
Adds the.
|
void |
add(String id,
String cql,
Map<String,String> attrs)
Adds the.
|
boolean |
equals(Object obj)
Equals.
|
NamedCQL |
get(String id)
Gets the.
|
int |
hashCode()
Hash code.
|
Set<String> |
keySet()
Key set.
|
void |
loadFrom(String filePath)
Load from.
|
void |
remove(String id)
Removes the.
|
void |
saveTo(File file)
Save to.
|
String |
toString()
To string.
|
public static final String CQL_MAPPER
public static final String CQL
public static final String ID
public CQLMapper()
public CQLMapper(String filePath)
filePath
- it could be multiple file paths separated by ',' or ';'public void loadFrom(String filePath) throws com.landawn.abacus.exception.UncheckedIOException
filePath
- it could be multiple file paths separated by ',' or ';'com.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionpublic NamedCQL add(String id, NamedCQL namedCQL)
id
- the idnamedCQL
- the named CQLpublic void add(String id, String cql, Map<String,String> attrs)
id
- the idcql
- the cqlattrs
- the attrspublic void remove(String id)
id
- the idpublic void saveTo(File file) throws com.landawn.abacus.exception.UncheckedIOException
file
- the filecom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionpublic boolean equals(Object obj)
Copyright © 2019. All rights reserved.