I have an TimelineEntity entity, that uses HoTimelineType enum with custom integer value. That custom integer value is stored in the database. Implemented via Using @PostLoad and @PrePersist Annotations Sprint JPA Repository is used to save and get entities. Here is the issue: When the newTE entity is saved, …
Tag: java
Java – Use PriorityQueue sort list but have empty list
This is my solution for leetcode 759. Employee Free Time, but it has index out of boundary issue that i don’t understand. I got “index 0 out of bounds for length 0” exception. The test case i used is ‘[[[1,2]],[[1,3]],[[4,10]]]’ and this is the output: I only have 3 lists and bas…
Criteria API join with filter
So I am trying to replace the following native SQL with JPA Criteria Api: or The entities look a bit like this: I implemented a org.springframework.data.jpa.domain.Specification I can use together with a JpaSpecificationExecutor like: and But I only get one side of the join/select like: when I do: How do I ad…
mapper does not convert between dto to entity
I am new to mapsturct I just want to map between dto to entity those two; my bank class; my bank dto class; my mapper below; Answer Target and source properties don’t work well with collections mapping. You need additional mapping for single element. Update your mapper as below, so Mapstruct can use ele…
Unsupported class file major version 61
I am trying to integrate Glowroot into my Java application. Unfortunately, I get the following error: Neither Glowroot nor my application seem to use gradle so I have no idea where this incompatibility is coming from. Have you got any idea on how I could find the source of the incompatibility and then how I c…
Updating notifications after being added
I want to update the content for a reminder after it has been added before being received by the user. After setting a reminder through AlarmManager using the data stored in sqlite database, the notification from the reminder set only shows the data, title and description, that was first added, not any update…
What would be the Regex to match following 6 digit numbers?
The numbers should be 6 digit and of the form 0x0x0x or x0x0x0, where x can be any digit from 1 to 9. Ex – 202020, 030303, 808080, etc. I have this regex that matches numbers with alternative 0 and 1s, cannot make it work for the above use case Answer The easiest way is probably to capture the repeating
Create Docker Image with Custom JDK
I’m attempting to create a Docker image for my custom JDK install. It’s simply the Jetbrains Runtime with Hotswap agent added to it. I’m new to docker images and creating a source image like this seems to be extra difficult to find clear documentation. So far, I have this in my Dockerfile an…
Does WebLogic Server 14 support JDK 6?
I want to migrate to WebLogic server 14 but, Could the Weblogic server 14 support old java versions like 6? Answer The requirements for various versions of WebLogic can be found in a xls file downloadable from this page. WebLogic 14c, in particular, requires Java 8 or Java 11
My custom validation annotation is not working in Spring Boot
i have created an annotation that has features such as checking if the entered string is null or at the assigned value.But the annotation doesn’t work. I don’t think it does any validation on the DTO.What am I doing wrong ? I also added the valid annotation on the controller. I don’t think t…