esoe 1 year ago
parent
commit
deb15c61aa
  1. 36
      src/main/java/ru/molokoin/home/entities/Media.java
  2. 9
      src/main/resources/META-INF/persistance.xml
  3. 12
      src/main/sql-scripts/home.sql
  4. 1
      src/main/webapp/content/test.txt
  5. 9
      target/classes/META-INF/persistance.xml
  6. BIN
      target/classes/ru/molokoin/home/entities/Media.class
  7. BIN
      target/classes/ru/molokoin/home/servlets/Storage.class
  8. BIN
      target/home.war
  9. 9
      target/home/WEB-INF/classes/META-INF/persistance.xml
  10. BIN
      target/home/WEB-INF/classes/ru/molokoin/home/entities/Media.class
  11. BIN
      target/home/WEB-INF/classes/ru/molokoin/home/servlets/Storage.class
  12. 1
      target/home/content/test.txt
  13. 5
      target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  14. 1
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

36
src/main/java/ru/molokoin/home/entities/Media.java

@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
package ru.molokoin.home.entities;
import java.io.Serializable;
import jakarta.persistence.Basic;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;
/**
* Класс сущности,
* хранит сведения о файлах размещенных на сервере
* и ссылку на размещенный файл
*/
@Entity
@Table(name = "Medias")
@NamedQueries({
@NamedQuery(name = "Medias.findAll",
query = "SELECT m FROM Media m")
})
public class Media implements Serializable{
@Id //уникальный идентификатор ресурса
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false) //не может быть null
@Column(name = "id")
private Integer id;// PRIMARY KEY AUTO_INCREMENT
private String name;// name varchar(300)
private String type;// varchar(10)
private String description;// varchar(1000)
private Integer parent;// DEFAULT (0)
}

9
src/main/resources/META-INF/persistance.xml

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemalocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<persistence-unit name="Repository" transaction-type="JTA">
<description>Подключение к базе molokoin.ru:3306/home</description>
<jta-data-source>java:/home</jta-data-source>
<!-- <class>ru.molokoin.home.entities.Media</class> -->
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
</persistence>

12
src/main/sql-scripts/home.sql

@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
create database home;
create table home.repository (
id INT PRIMARY KEY AUTO_INCREMENT,
name varchar(300) not null,
type varchar(10),
description varchar(1000),
parent INT DEFAULT(0)
);
ALTER TABLE home.repository ADD data LARGEBLOB;

1
src/main/webapp/content/test.txt

@ -1 +0,0 @@ @@ -1 +0,0 @@
test1

9
target/classes/META-INF/persistance.xml

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemalocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<persistence-unit name="Repository" transaction-type="JTA">
<description>Подключение к базе molokoin.ru:3306/home</description>
<jta-data-source>java:/home</jta-data-source>
<!-- <class>ru.molokoin.home.entities.Media</class> -->
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
</persistence>

BIN
target/classes/ru/molokoin/home/entities/Media.class

Binary file not shown.

BIN
target/classes/ru/molokoin/home/servlets/Storage.class

Binary file not shown.

BIN
target/home.war

Binary file not shown.

9
target/home/WEB-INF/classes/META-INF/persistance.xml

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemalocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<persistence-unit name="Repository" transaction-type="JTA">
<description>Подключение к базе molokoin.ru:3306/home</description>
<jta-data-source>java:/home</jta-data-source>
<!-- <class>ru.molokoin.home.entities.Media</class> -->
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
</persistence>

BIN
target/home/WEB-INF/classes/ru/molokoin/home/entities/Media.class

Binary file not shown.

BIN
target/home/WEB-INF/classes/ru/molokoin/home/servlets/Storage.class

Binary file not shown.

1
target/home/content/test.txt

@ -1 +0,0 @@ @@ -1 +0,0 @@
test1

5
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
ru\molokoin\home\util\HardDrive.class
ru\molokoin\home\servlets\Storage.class
ru\molokoin\home\entities\Media.class
ru\molokoin\home\servlets\Download.class
ru\molokoin\home\servlets\Delete.class
ru\molokoin\home\servlets\Main.class
ru\molokoin\home\util\HardDrive.class
ru\molokoin\home\servlets\Download.class

1
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
C:\Users\Strannik\Documents\esoe\code\home\src\main\java\ru\molokoin\home\servlets\Storage.java
C:\Users\Strannik\Documents\esoe\code\home\src\main\java\ru\molokoin\home\entities\Media.java
C:\Users\Strannik\Documents\esoe\code\home\src\main\java\ru\molokoin\home\servlets\Download.java
C:\Users\Strannik\Documents\esoe\code\home\src\main\java\ru\molokoin\home\servlets\Delete.java
C:\Users\Strannik\Documents\esoe\code\home\src\main\java\ru\molokoin\home\servlets\Main.java

Loading…
Cancel
Save