public SessionMetadata unwrapMetaValue(MetaValue metaValue) {
if (metaValue == null)
return null;
if (metaValue instanceof CompositeValue) {
CompositeValue compositeValue = (CompositeValue) metaValue;
SessionMetadata session = new SessionMetadata();
session.setApplicationName((String) metaValueFactory.unwrap(compositeValue.get(APPLICATION_NAME)));
session.setCreatedTime((Long) metaValueFactory.unwrap(compositeValue.get(CREATED_TIME)));
session.setClientHostName((String) metaValueFactory.unwrap(compositeValue.get(CLIENT_HOST_NAME)));
session.setIPAddress((String) metaValueFactory.unwrap(compositeValue.get(IP_ADDRESS)));
session.setLastPingTime((Long) metaValueFactory.unwrap(compositeValue.get(LAST_PING_TIME)));
session.setSessionId((String) metaValueFactory.unwrap(compositeValue.get(SESSION_ID)));
session.setUserName((String) metaValueFactory.unwrap(compositeValue.get(USER_NAME)));
session.setVDBName((String) metaValueFactory.unwrap(compositeValue.get(VDB_NAME)));
session.setVDBVersion((Integer) metaValueFactory.unwrap(compositeValue.get(VDB_VERSION)));
session.setSecurityDomain((String) metaValueFactory.unwrap(compositeValue.get(SECURITY_DOMAIN)));
return session;
}
throw new IllegalStateException("Unable to unwrap session " + metaValue); //$NON-NLS-1$
}