-
Notifications
You must be signed in to change notification settings - Fork 128
Dev Frames Extensions
sgilda edited this page May 4, 2015
·
8 revisions
Windup has several Frames extensions to satisfy its needs.
The upstream frames project only stores one type in the type property by default. Windup extends this default type resolver behavior to support multiple types. The values themselves are stored in a multi-valued Titan property on each Vertex.
To store a map in a single vertexes properties:
@TypeValue("MapModelMain")
public interface MapMainModel extends WindupVertexFrame
{
@MapInProperties void setMap(Map<String, MapValueModel> map);
@MapInProperties Map<String, MapValueModel> getMap();
}
To store a map in as adjacent vertices.
@TypeValue("MapModelMain")
public interface MapMainModel extends WindupVertexFrame
{
@MapInAdjacentProperties(label = "map") void setMap(Map<String, MapValueModel> map);
@MapInAdjacentProperties(label = "map") Map<String, MapValueModel> getMap();
}
See the FrameMapHandlerTest.