public class Container<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Container.MODEL
The sharing MODEL of the objects created by this instance.
|
static class |
Container.TYPE
The TYPE of the objects created by this instance.
|
Constructor and Description |
---|
Container()
Create a container without a name.
|
Container(Container.TYPE type)
Create a container (system assigned name) of the specified type.
|
Container(Container.TYPE type,
Container.MODEL model)
Create a container (system assigned name) of the specified type and model.
|
Container(String name)
Create a named container.
|
Container(String name,
Container.TYPE type)
Create a named container.
|
Container(String name,
Container.TYPE type,
Container.MODEL model)
Create a named container.
|
Modifier and Type | Method and Description |
---|---|
T |
clone(T member,
T proxy)
Given an existing object, create another handle.
|
T |
clone(T member,
Uid id)
Given an identified for an existing object, create another handle.
|
T |
create(T member)
Given an object we create a new transactional instance of it and return that
for future use.
|
static Container<?> |
getContainer(Object proxy)
Given the proxy return the container that is managing it.
|
Uid |
getIdentifier(T proxy) |
Container.MODEL |
model() |
String |
name()
Get the name of the container.
|
Container.TYPE |
type() |
public Container()
public Container(Container.TYPE type)
type
- the type of objects created.public Container(Container.TYPE type, Container.MODEL model)
type
- the TYPE of objects.model
- the MODEL of the objects.public Container(String name)
name
- the name (should be unique, but this is not enforced).public Container(String name, Container.TYPE type)
name
- the name (should be unique, but this is not enforced).type
- the TYPE of objects.public Container(String name, Container.TYPE type, Container.MODEL model)
name
- the name (should be unique, but this is not enforced).type
- the TYPE of objects.model
- the MODEL of objects.public final String name()
public final Container.TYPE type()
public final Container.MODEL model()
public T create(T member)
member
- the instance of type T that you want to be made transactional and persistent.public T clone(T member, T proxy)
member
- the instance of type T that you want to be made transactional and persistent.proxy
- the instance you want to copy.public T clone(T member, Uid id)
member
- the instance of type T that you want to be made transactional and persistent.id
- the Uid of the object.Copyright © 2021 JBoss by Red Hat. All rights reserved.