current.setDescription(sPluginBundleVersion.getArtifactId()); current.setIcon(sPluginBundleVersion.getIcon()); current.setMismatch(sPluginBundleVersion.isMismatch()); current.setRepository(sPluginBundleVersion.getRepository()); current.setType(getSConverter().convertFromSObject(sPluginBundleVersion.getType()));
pluginBundleVersion.setGroupId(sPluginBundleVersion.getGroupId()); pluginBundleVersion.setIcon(sPluginBundleVersion.getIcon()); pluginBundleVersion.setMismatch(sPluginBundleVersion.isMismatch()); pluginBundleVersion.setRepository(sPluginBundleVersion.getRepository()); pluginBundleVersion.setType(getSConverter().convertFromSObject(sPluginBundleVersion.getType()));
public PluginBundleVersion convertFromSObject(SPluginBundleVersion input, PluginBundleVersion result, DatabaseSession session) throws BimserverDatabaseException { if (input == null) { return null; } result.setVersion(input.getVersion()); result.setType(PluginBundleType.values()[input.getType().ordinal()]); result.setDescription(input.getDescription()); result.setMismatch(input.isMismatch()); result.setRepository(input.getRepository()); result.setGroupId(input.getGroupId()); result.setArtifactId(input.getArtifactId()); result.setIcon(input.getIcon()); result.setOrganization(input.getOrganization()); result.setName(input.getName()); result.setDate(input.getDate()); return result; } public SPluginBundleType convertToSObject(PluginBundleType input) {
@Override public SPluginBundle getPluginBundle() { SPluginBundle result = new SPluginBundle(); result.setName(sPluginBundle.getName()); result.setOrganization(sPluginBundle.getOrganization()); if (sPluginBundle.getInstalledVersion() != null) { SPluginBundleVersion installedVersion = new SPluginBundleVersion(); installedVersion.setArtifactId(sPluginBundle.getInstalledVersion().getArtifactId()); installedVersion.setDescription(sPluginBundle.getInstalledVersion().getDescription()); installedVersion.setGroupId(sPluginBundle.getInstalledVersion().getGroupId()); installedVersion.setIcon(sPluginBundle.getInstalledVersion().getIcon()); installedVersion.setMismatch(sPluginBundle.getInstalledVersion().isMismatch()); installedVersion.setName(sPluginBundle.getInstalledVersion().getName()); installedVersion.setOrganization(sPluginBundle.getInstalledVersion().getOrganization()); installedVersion.setRepository(sPluginBundle.getInstalledVersion().getRepository()); installedVersion.setType(sPluginBundle.getInstalledVersion().getType()); installedVersion.setVersion(sPluginBundle.getInstalledVersion().getVersion()); result.setInstalledVersion(installedVersion); } return result; }