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

tv.hd3g.jobkit.watchfolder.mod.entity.BaseEntity Maven / Gradle / Ivy

Go to download

Keep in a database JobKit Watchfolder's detected and tracked files persistent as reboot

There is a newer version: 22.0.0
Show newest version
/*
 * This file is part of AuthKit.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * Copyright (C) hdsdi3g for hd3g.tv 2019
 *
 */
package tv.hd3g.jobkit.watchfolder.mod.entity;

import static jakarta.persistence.GenerationType.IDENTITY;

import java.util.Date;

import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;

@MappedSuperclass
public abstract class BaseEntity {

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Getter
	private Integer id;

	@NotNull
	@Getter
	private Date created;

	protected void initCreate() {
		created = new Date();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy