[FIX] cover tools
This commit is contained in:
parent
d4eb9c2a5f
commit
84525fd7aa
@ -242,7 +242,7 @@ public class AddOnDataJson implements DataAccessAddOn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.covers.add(remoteKey);
|
data.covers.add(remoteKey);
|
||||||
DataAccess.update(data, data.id, List.of("covers"), new OverrideTableName(tableName));
|
DataAccess.update(data, data.uuid, List.of("covers"), new OverrideTableName(tableName));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addLink(final Class<?> clazz, final UUID uuid, final String column, final Long remoteKey)
|
public static void addLink(final Class<?> clazz, final UUID uuid, final String column, final Long remoteKey)
|
||||||
@ -297,7 +297,7 @@ public class AddOnDataJson implements DataAccessAddOn {
|
|||||||
newList.add(elem);
|
newList.add(elem);
|
||||||
}
|
}
|
||||||
data.covers = newList;
|
data.covers = newList;
|
||||||
DataAccess.update(data, data.id, List.of("covers"), new OverrideTableName(tableName));
|
DataAccess.update(data, data.uuid, List.of("covers"), new OverrideTableName(tableName));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void removeLink(final Class<?> clazz, final Long id, final String column, final Long remoteKey)
|
public static void removeLink(final Class<?> clazz, final Long id, final String column, final Long remoteKey)
|
||||||
|
@ -3,11 +3,10 @@ package org.kar.archidata.dataAccess.addOn.model;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.kar.archidata.annotation.DataJson;
|
import org.kar.archidata.annotation.DataJson;
|
||||||
import org.kar.archidata.model.GenericDataSoftDelete;
|
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
public class TableCoversLongLong extends GenericDataSoftDelete {
|
public class TableCoversLongLong {
|
||||||
public TableCoversLongLong() {
|
public TableCoversLongLong() {
|
||||||
// nothing to do...
|
// nothing to do...
|
||||||
}
|
}
|
||||||
@ -17,8 +16,10 @@ public class TableCoversLongLong extends GenericDataSoftDelete {
|
|||||||
this.covers = covers;
|
this.covers = covers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Id
|
||||||
|
public Long id;
|
||||||
|
|
||||||
@DataJson()
|
@DataJson()
|
||||||
@Column(nullable = false)
|
|
||||||
public List<Long> covers;
|
public List<Long> covers;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,10 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.kar.archidata.annotation.DataJson;
|
import org.kar.archidata.annotation.DataJson;
|
||||||
import org.kar.archidata.model.GenericDataSoftDelete;
|
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
public class TableCoversUUIDUUID extends GenericDataSoftDelete {
|
public class TableCoversUUIDUUID {
|
||||||
public TableCoversUUIDUUID() {
|
public TableCoversUUIDUUID() {
|
||||||
// nothing to do...
|
// nothing to do...
|
||||||
}
|
}
|
||||||
@ -19,11 +17,9 @@ public class TableCoversUUIDUUID extends GenericDataSoftDelete {
|
|||||||
this.covers = covers;
|
this.covers = covers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(nullable = false)
|
|
||||||
@Id
|
@Id
|
||||||
public UUID uuid;
|
public UUID uuid;
|
||||||
@DataJson()
|
@DataJson()
|
||||||
@Column(nullable = false)
|
|
||||||
public List<UUID> covers;
|
public List<UUID> covers;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ public class DataTools {
|
|||||||
// public NodeSmall uploadFile(final FormDataMultiPart form) {
|
// public NodeSmall uploadFile(final FormDataMultiPart form) {
|
||||||
LOGGER.info("Upload media file: {}", fileMetaData);
|
LOGGER.info("Upload media file: {}", fileMetaData);
|
||||||
LOGGER.info(" - id: {}", id);
|
LOGGER.info(" - id: {}", id);
|
||||||
LOGGER.info(" - file_name: ", fileMetaData.getFileName());
|
LOGGER.info(" - file_name: {} ", fileMetaData.getFileName());
|
||||||
LOGGER.info(" - fileInputStream: {}", fileInputStream);
|
LOGGER.info(" - fileInputStream: {}", fileInputStream);
|
||||||
LOGGER.info(" - fileMetaData: {}", fileMetaData);
|
LOGGER.info(" - fileMetaData: {}", fileMetaData);
|
||||||
final CLASS_TYPE media = DataAccess.get(clazz, id);
|
final CLASS_TYPE media = DataAccess.get(clazz, id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user