This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cu.uclv.postgrade.ui.view.entity; | |
import cu.uclv.postgrade.data.entity.professor.CourseProfessor; | |
import cu.uclv.postgrade.data.entity.professor.TrainingProfessor; | |
public record EditionProfessorFactory<T>(Class<T> entityClass) implements HasEntityComplexConstructor<T> { | |
public static EditionProfessorFactory<CourseProfessor> courseProfessor = new EditionProfessorFactory<>(CourseProfessor.class); | |
public static EditionProfessorFactory<TrainingProfessor> trainingProfessor = new EditionProfessorFactory<>(TrainingProfessor.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.vaadin.flow.component.button.Button; | |
import com.vaadin.flow.component.grid.Grid; | |
import com.vaadin.testbench.unit.SpringUIUnit4Test; | |
import cu.uclv.postgrade.Application; | |
import cu.uclv.postgrade.ui.view.course.program.CourseProgramListView; | |
import org.junit.Test; | |
import org.junit.jupiter.api.Assertions; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.boot.test.context.SpringBootTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function random_number(length integer) | |
returns text | |
as | |
$$ | |
declare | |
alphabet text[] := '{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}'; | |
result text := ''; | |
i integer := 0; | |
begin | |
for i in 1..length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class CourseEnrollment { | |
@EmbeddedId | |
protected Id id = new Id(); | |
@ManyToOne(optional = false, fetch = FetchType.LAZY) | |
@JoinColumn(name = "student_id", insertable = false, updatable = false) | |
protected Student student; |