public class MyBatisContext extends Object
MyBatisContext
instances get passed to MyBatis mapped statements as arguments, making Ids, instances,
domainType and other attributes available to the statements. All methods might return null depending on
the kind of values available on invocation.Constructor and Description |
---|
MyBatisContext(Identifier identifier,
Object instance,
Class<?> domainType) |
MyBatisContext(Object id,
Object instance,
Class domainType,
Map<String,Object> additionalValues) |
Modifier and Type | Method and Description |
---|---|
Object |
get(String key)
Returns a value for the given key.
|
Class |
getDomainType()
The domain type of the entity to query or act upon.
|
Object |
getId()
The ID of the entity to query/act upon.
|
Identifier |
getIdentifier()
The
Identifier for a path to query. |
Object |
getInstance()
The entity to act upon.
|
public MyBatisContext(@Nullable Object id, @Nullable Object instance, @Nullable Class domainType, Map<String,Object> additionalValues)
public MyBatisContext(Identifier identifier, @Nullable Object instance, @Nullable Class<?> domainType)
@Nullable public Object getId()
null
.@Nullable public Identifier getIdentifier()
Identifier
for a path to query.@Nullable public Object getInstance()
null
for queries, since the object doesn't exist before the query.null
.@Nullable public Class getDomainType()
null
.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.