All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.svws_nrw.db.converter.current.DavRessourceCollectionTypConverter Maven / Gradle / Ivy

Go to download

Diese Bibliothek regelt den Zugriff auf Datenbanken für die Schulverwaltungssoftware in NRW

The newest version!
package de.svws_nrw.db.converter.current;

import de.svws_nrw.core.types.dav.DavRessourceCollectionTyp;
import de.svws_nrw.db.converter.DBAttributeConverter;
import jakarta.persistence.Converter;
import jakarta.validation.constraints.NotNull;


/**
 * Diese Klasse dient dem Konvertieren von DavRessourceCollectionTypen.
 */
@Converter(autoApply = true)
public final class DavRessourceCollectionTypConverter extends DBAttributeConverter {

	/** Die Instanz des Konverters */
	public static final DavRessourceCollectionTypConverter instance = new DavRessourceCollectionTypConverter();

	@Override
	public Integer convertToDatabaseColumn(final DavRessourceCollectionTyp typ) {
		return typ.id;
	}

	@Override
	public @NotNull DavRessourceCollectionTyp convertToEntityAttribute(final Integer dbData) {
		return DavRessourceCollectionTyp.getByID(dbData);
	}

	@Override
	public Class getResultType() {
		return DavRessourceCollectionTyp.class;
	}

	@Override
	public Class getDBType() {
		return Integer.class;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy