((StyleInfoImpl)entity).setCatalog(catalog);
}
else if (entity instanceof LayerGroupInfoImpl) {
//hack to get around default styles being represented by null
//TODO: see if we can coax the hibernate mappings into doing this for us
LayerGroupInfoImpl lg = (LayerGroupInfoImpl) entity;
if (lg.getStyles().isEmpty()) {
for (LayerInfo l : lg.getLayers()) {
lg.getStyles().add(null);
}
}
}
else if (entity instanceof ServiceInfoImpl) {
((ServiceInfoImpl)entity).setGeoServer(geoServer);