[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)
Implement this interface when implementing special custom Aliases
for classes, packages or namespaces.
Namespace: Db4objects.Db4o.Config
Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Interface IAlias |
C# |
---|
public interface IAlias |
Visual C++ |
---|
public interface class IAlias |
Remarks
Implement this interface when implementing special custom Aliases
for classes, packages or namespaces.
Aliases can be used to persist classes in the running application to different persistent classes in a database file or on a db4o server.
Two simple Alias implementations are supplied along with db4o:
- Db4objects.Db4o.Config.TypeAlias provides an #equals() resolver to match names directly.
- Db4objects.Db4o.Config.WildcardAlias allows simple pattern matching with one single '*' wildcard character.
It is possible to create own complex Db4objects.Db4o.Config.IAlias constructs by creating own resolvers that implement the Db4objects.Db4o.Config.IAlias interface.
Four examples of concrete usecases:
Aliases that translate the persistent name of a class to a name that already exists as a persistent name in the database (or on the server) are not permitted and will throw an exception when the database file is opened.
Aliases should be configured before opening a database file or connecting to a server.
Aliases can be used to persist classes in the running application to different persistent classes in a database file or on a db4o server.
Two simple Alias implementations are supplied along with db4o:
- Db4objects.Db4o.Config.TypeAlias provides an #equals() resolver to match names directly.
- Db4objects.Db4o.Config.WildcardAlias allows simple pattern matching with one single '*' wildcard character.
It is possible to create own complex Db4objects.Db4o.Config.IAlias constructs by creating own resolvers that implement the Db4objects.Db4o.Config.IAlias interface.
Four examples of concrete usecases:
![]() | |
---|---|
// Creating an Alias for a single class |
Aliases that translate the persistent name of a class to a name that already exists as a persistent name in the database (or on the server) are not permitted and will throw an exception when the database file is opened.
Aliases should be configured before opening a database file or connecting to a server.